I found a neat multi-servo program using interrupts, written in Mikro Basic (I think - looks familiar). I translated as much as I could into PBP, but I cannot get the system to work. I've gone over it many times and ran the ICD in MCS+ trying to troubleshoot it. (Unfortunately ICD doesn't seem to work for interrupts).
I uploaded both programs for "someone" to take a look at to see if there is something obvious I'm doing wrong.
FYI, some things that I did change: 1) I don't have the For-Next loop to add all the servos, I only use one for now. 2) my servo is servo1 at PortA.0. 3) Mikro program used a 16F877 at 20MHz, I am using a 16F887 at 4 MHz so I changed the timer preload and prescaler accordingly. I'm comfortable with timers and interrupts, but i'm certainly no expert.
Any help is appreciated of course.
Original Mikro Basic is Servo8_1000. My PBP attempt is Servo8_100FEMOD
Oh...I have some difficulties with loading the 16bit timer TMR1
Bookmarks