• 0
Can

Cerebot 32MX4 With PModCls

Question

Hello,

for 2 weeks I'm trying to use cerebot 32mx4 to write a text on pmodcls, but I've failed many times thats why I want to ask for some advices

1.) Which program should I use exactly ? ( That is an old board, so some people says thay've used mplab, someone used mpide and different things but I don't know what to use exactly)

2.) Where can I find the pmodcls's library (If you have , could you send me please ?)

3.) Does some one have an example code for trying ?

and any instructions you may tell me , please tell me , I need any type of information about that,

thank you...

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi Can,

I would use MPIDE to program the Cerebot board, primarily because that is the environment that we have example code (linked to by Dan) available for the PmodCLS. Alternatively, you can use the Arduino IDE with the chipKIT Core which is the IDE currently supported over MPIDE to program the board as well.

Let me know if you have any more questions.

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

Hey Can,

I'd say your best bet would be to use the MPLAB X IDE for programming the Cerebot. It'll require a bit more work (determining register configurations and such) but you'll be able to program it with that.

MPIDE would be more convenient if you just wanted to run a demo and tweak it a little, however the Cerebot will need to have a boot loader installed in order for you to program it with MPIDE. The boot loader is loaded during manufacturing for the successor to the Cerebot 32mx4 (the chipKIT MX4 Pro), however I am not certain if the Cerebot is compatible with the boot loader for the MX4. If you want to give it a try (just to make MPIDE or the Arduino IDE possible programming options) there are some instructions on page 4 of the MX4 reference manual that you can follow to see if it'll take it.

The other files you may need for programming it with MPLAB X are the DSPI library and Board_defs.h and .c (possibly helpful) for the Cerebot. The DSPI folder in the MPIDE files is located under hardware/pic32/libraries, while the Cerebot files are under hardware/pic32/variants/Cerebot_32MX4. Between these and the example code Dan linked to you should have everything you need.

I have not personally played with the PmodCLS myself, but I have gone through a similar process to get the PmodOLED to work through MPLAB X and it was fairly straight forward once the tools were set up. I hope this was more helpful than confusing, but let us know if you have any other questions.

-Nate

Share this post


Link to post
Share on other sites
  • 0

Hello,

First of all you should understand that there are major differences between Cerebot 32mx4 http://store.digilentinc.com/cerebot-32mx4-limited-time-see-chipkit-pro-mx4/ and Cerebot 32mx4cK (also called chipKIT Pro MX4): http://store.digilentinc.com/chipkit-pro-mx4-embedded-systems-trainer-board-limited-time/ regarding MPIDE usage:

The first one does not have the UART USB connector therefore it can't be used with MPIDE (or Arduino IDE). 

Apart from this, the boards are pretty similar.

So, what can we do? Obviously, my advice is to focus on using the board with standard Microchip tools (MPLABX).

But you don't have a MPLABX library for PmodCLS, so you will have to take a look at the MPIDE library  (linked by Dan), see how it works, and implement it on MPLABX.

Basically there are some low level access function (like SendBytes) that implement the SPI communication and there are upper level functions that call the low level functions.

You will have to implement the low level functions using the PIC32MX4 registers.

You can find examples of SPI implementations over the Internet, or at Microchip documentation.

You can also use Microchip Harmony for this (although we preferred to do direct register access). I am attaching here some kind of SPI library that I used for a PIC32MX370F512L (a similar but yet different microcontroller) to communicate over SPI with a flash memory. You should only use the low level functions like ConfigureSPI, TransferByte, TransferBytes. Also note that these source files are in work, they are not polished to be released.

Good luck.

SPI.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now