Thursday, June 08, 2006
PWMing along...
Got the little yellow G4 gear motor going on the test board. I wore out two PIC16F628A chips learning how which is cheap at the price. :-)
Here's the little test programme in BASIC that does the job...
TRISB = %11000111
PORTB.5 = 1
PWMon 1, 9
PWMduty 1, 200
That's it. The TRISB and PORTB settings I got out of Adrian's servo.c code. Works like a champ.
Things started moving really fast after I figured out how to connect the virtual oscilloscope to the virtual PIC16F628A chip. I've also got a virtual signal generator which should let the retarded Plaas integrate the rotary encoder chip and limits switches when I get my nerve up to try that. :-s
Here's a pic of the IDE in action.
YES!!!!!!!
Here's the little test programme in BASIC that does the job...
TRISB = %11000111
PORTB.5 = 1
PWMon 1, 9
PWMduty 1, 200
That's it. The TRISB and PORTB settings I got out of Adrian's servo.c code. Works like a champ.
Things started moving really fast after I figured out how to connect the virtual oscilloscope to the virtual PIC16F628A chip. I've also got a virtual signal generator which should let the retarded Plaas integrate the rotary encoder chip and limits switches when I get my nerve up to try that. :-s
Here's a pic of the IDE in action.
YES!!!!!!!