|
Goal: The object of this project is to design and develop a control board that attaches to the cargo bay parallel port of the iRobot Create. The microcontroller selected for this task is the PIC18F4525.
08/13/07: I wrote a state machine to handle the requesting of sensors from the Create. It requests the sensors and then waits for them to arrive. Once they arrive, they are placed into corresponding variables. Then waits for the keep_time function to tell it to request again. I set the request timing to every 100ms.
08/12/07: Took some time, but I finally was able to get the receiving correct. I tested the receiving of data by continuously refreshing the left cliff sensor signal divided by a factor of 16 on the LED bar.
07/18/07: Today, I was able to send commands from the PIC to the Create. Unfortunately, this was after trying to debug a ghost issue in the code. The code was actually correct. What happened was the PIC I was using had a damaged UART port, which I had already known about from long ago when I accidentally shorted the pin. After changing the communication baud rate to 57600 (the default baud of the Create, which can be changed to 19200) and being 98% certain my code was correct, I had no other option but to replace the PIC with another one. Of course, this time it worked, and I then remembered I had a PIC with a burnt out UART pin...
Moral of the story (lessons learned): Always label damaged PIC's even if it's just one pin. Also, no matter how troublesome it seems to swap out a PIC when it's in a breadboard and there's wires all around it; it is better to deal with it sooner than later. In this case, it would have saved me 1 hour of debugging time!
I will hopefully figure out a neat way of adding pictures in here soon, so I can start posting pictures without having to put them in full resolution. I guess for the mean time I'll add resized ones. Scratch that, I decided to just use rollover images. I'll figure out a fancier way to do this later on.
Here is a picture of the breadboard prototype on the Create. I will later on connect the buttons and dip switch.

07/17/07: After successfully re-writing my template for the PIC18F4525 without extended-mode, I chose this PIC for this project. Today I finished setting up the template and began building the circuit prototype on a bread board.
|