The Oshon Software PIC Simulator IDE system appears to be an effective, affordable way to work with the PIC16F628A.
I'd previously built up several test boards for the PIC and was trying to crack the serial comms/UART problem. The BoostBasic compiler I tried sorta/kinda worked but Assembler worked a lot better but still had some troubling sorts of behaviours.
It took me 5 minutes to retarget some UART code written in Oshon PIC Basic from the PIC16F877 to the PIC 16F628A, compile it, burn it onto the PIC and get it running first with Hyperterminal and then with the little VB.NET serial comms programme that I'd adapted to talk through the RepRap comms board to my PIC test board.
An hour later I rewrote the UART sample code to do a proper job of echoing. That took another big 5 minutes to go from writing to testing the reprogrammed PIC.
My next project will be to build up a little PIC test board with a SN754410 and program it to do speed control with a PWM routine that can be controlled through my serial comms programme. Oshon has a very nice little software emulator for PIC chips that takes your hex file, lets you execute it in software and keep track of what all the ports and registers are doing. I ran it with my UART programme and was able to keep track of the serial IO that I put into the chip and watched it come back out, all before I tried to burn it onto a chip. I'm hoping to have time in the next week to get used to running that well enough to make sure that what I think is happening with PWM is really happening. :-)
After that it's integrating the AustriaMicrosystems shaft encoder chip and after that integrating the Hamamatsu optical detector chips for limits control.
Then comes the hard part. I've either got to find a much higher amperage equivalent of the SN754410 or I've got to build one up from components. I have several good schematics for that sort of thing, but the circuits I have will have to be added to for directional control. Hopefully, Freescale has some driver chips that do all that. Their catalog descriptions look hopeful. :-)
No comments:
Post a Comment