Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hi,zanes said:In the labs at uni, or at home. It triggers an LED on the outputs though, so it is obviously triggering it. Or is the output somehow (linearly?) related to the input voltage?
zanes said:Hmmm.... I think the problem may lie in my hbridge, as I have just been doing some testing with the PIC loaded up, and I've got some weird results. I'll probably cop out and buy a controller IC!
Yes, it lights an LED. The reason I have my program setup this way is that is the easiest way I could think of implementing my design on my PIC!
Main
[B];bcf porta,0 ;turns both
;bcf porta,1
;bcf portb,0 ;motors off
;bcf portb,1[/B]
btfsc porta,2 ;tests light on right LDR
goto rightlight ;if light,goto rightlight
[B]bcf portb,0;;turn off if not called[/B]
btfsc porta,3 ;tests light on left LDR
goto leftlight ;if light,goto left light
[B]bcf porta,0;turn off if not called [/B]
goto Main
rightlight