chipKIT® Development Platform

Inspired by Arduino™

PmodOLED with CEREBOT 32MX7

Created Sat, 03 Dec 2011 05:39:12 +0000 by lloyddean


lloyddean

Sat, 03 Dec 2011 05:39:12 +0000

I don't see any discussion forums at the Digilent site. Can anyone suggest a place I can discuss getting the PmodOLED example working with the CEREBOT 32MX7 board.

This is my first experience with the non Arduino boards and am not quite sure what I've missed with my attempt at modifying the project files and source for the 32MX7.


Jacob Christ

Sat, 03 Dec 2011 05:45:55 +0000

If your using the chipKIT MPDE to code I'm guessing this is the right place to post. If your not, you may still get help since some Digilent people troll here..

I wish I could help more, but I haven't used that board nor am I familiar with the example.

Jacob


lloyddean

Sat, 03 Dec 2011 06:33:13 +0000

Nope, I'm using the MicroChip MPLAB 8.x IDE.

The included example code for the PmodOLED is for the 32MX4 board which works just fine but I would also like to get it working with the 32MX7.

Thanks for making the attempt!


lloyddean

Sat, 03 Dec 2011 19:57:47 +0000

Can anyone tell me if the following document has any effect on SPI cables as well.

<http://www.digilentinc.com/Data/Documents/Other/Connecting%20UART%20Pmod%20Interfaces.pdf>


lloyddean

Sat, 10 Dec 2011 18:14:04 +0000

<AttemptAtProvocation>

So, nobody know nothing!

</AttemptAtProvocation>


GeneApperson

Tue, 13 Dec 2011 23:50:10 +0000

Can anyone tell me if the following document has any effect on SPI cables as well. <http://www.digilentinc.com/Data/Documents/Other/Connecting%20UART%20Pmod%20Interfaces.pdf>

That cable crosses over pins 2 & 4. It is needed on the UART interfaces of some of our boards (explanation to follow) but doesn't do anything useful for SPI interfaces.

When I designed the first Cerebot board using an AVR microcontroller about six or seven years ago, I didn't pay much attention to compatibility for the pinouts of the connectors that supported UART vs the connectors that supported SPI. They were entirely different controllers, so I didn't make sure that RX and TX lined up with MISO and MOSI. We then designed serveral Pmods with UART interfaces with RX and TX on pins 3 & 4.

When I designed the Cerebot 32MX4, I followed our pinout convention for UART and SPI ports.

When I designed the Cerebot 32MX7, I discovered that on the newer PIC32 devices (PIC32MX5XX/6XX/7XX series), Microchip had put in new serial controllers that supported UART, SPI and I2C in the same controller. Of course, they used the same pins for RX and TX as they used for SDI an SDO. I decided that the flexibility of being able to have the same connector support both SPI and UART was too good to give up.

So, I changed the pinouts of the UART connectors. The change is to swap the signals on pins 2 & 4. This leaves us with older products (like the 32MX4 and the PmodRS232) that are incompatible with the newer products (like the 32MX7). The reaon for the cable you referred to is to allow them to be used together.

However, since the PmodOLED is an SPI device, this cable isn't relevant to it. I didn't write that demo (although the library is based on the library that I wrote for the chipKIT Basic I/O Shield), so I don't know the specifics, but I'd think that the first thing to do is to make sure that you are using the correct SPI port.

I can answer some questions about this, but I'm not sure if it is appropriate to do non-chipKIT stuff in this forum.

Gene Apperson Digilent


lloyddean

Wed, 14 Dec 2011 22:26:51 +0000

Gene,

Thanks for the reply!

Can you recommend a forum for discussion concerning the porting of software from Cerebot board to Cerebot board?

The PmodOLED, being a known working SPI device on the Cerebot 32MX4, was just a stepping stone in understanding how to port SPI based software between the two devices.

If I'm reading the documentation correctly (from memory) the 32MX4 board uses SPI2 on PMOD port JB while the 32MX7 (in order to use the same physical connector on the external device) will be using PMOD port JD and SPI1. This I believe simply requires a remapping of port registers and port bit numbers.

Am I mistaken?

Sorry if this discussion is out of bounds for this forum but I did post under "General Discussion" which to me seems reasonable.


GeneApperson

Wed, 28 Dec 2011 22:30:16 +0000

Sorry it has taken so long to get back to you. I've been really busy lately, and I missed that you have replied to my post.

You are correct that the 32MX4 has SPI2 mapped to connector JB. The 32MX7 has SPI1 on JD, SPI3 on JE and SPI4 on JF. For the SPI port you would need to change the port number to the appropriate one being used. The PmodOLED uses some additional control signals, and you would need to remap the port and pin numbers for those as well depending on which connector you are going to use.

If you still have questions or are having problems with this, send me a private message and I'll work with you to get it sorted out.

We're probably going to start a support forum on the Digilent web site, but we have to work out some more details before we can get it set up.

Gene Apperson Digilent