Pages

Wednesday, June 07, 2006

G4 Motor Control Card

The Oshon Basic compiler made establishing serial comms with the PIC16F628A UART pretty much child's play. Adrian's schematic for controlling a G4/rotary encoder ensemble was pretty clear, so I decided that my next baby step would be to see if I could just control a G4 from my PC via serial comms via our standard PIC. I trimmed down Adrian's schematic to the bare essentials and built up a test board.
I was then able to leverage the UART programme that I knew already worked to test the board and got it going on the third try after breaking a strip that I'd missed with my Dremel tool and soldering a dry joint that I'd also missed.

It's one thing to just echo characters back to your PC and quite another to send the PIC some information and have it recognise what it is and to know when it has it all and then to tell you that it has it.

That took a bit of hacking at the VB.NET serial comms programme and well as the PIC programme, but with the Oshon PIC Simulator it went fairly smoothly. Now that I have the PIC getting motor speed information from the PC the next step is to port Adrian's PWM routine into the PIC programme and see if I can crank the motor. :-)

No comments:

Post a Comment