Vandal S
Member level 3
uart1_read mikroc
i need urgent with a problem that i can't undestand. i am a beginner so you can expect that i made huge errors, but please help me because i have an exam in a couple of days
i wrote a program in mikroc, which gets a character by USART and starts 4 leds (actually there are 2 motors, but for the simplicity i removed that circuit). i used interrupts and delays.
the problem is that if i limit the current to a very low value, even the leds don't light, but they blink rapiddly according to my program. so they work ok.
but if i increase the current, they behave strangely. i press (as it is pc controlled) to go left and it remains in left. the same is for right. i press up, it randomly activates left, then a little back so the motors stops, then up again.. i haven't seen a perfect pattern, just that most of the time (not always) left and right are activated at the right time, but they stay forever.
i don't think it's a rf problem (there are rf modules between pc and pic 16f877) because at very low current (<50mA) they blink as they should.
the program i think is good, because in proteus works
it could be that it's not filtered enough? but i put 2 capacitors at the 7805, 2 at the oscillator..
please, once again, help me with an ideea, something. at least to know the cause, if not to solve it.
i need urgent with a problem that i can't undestand. i am a beginner so you can expect that i made huge errors, but please help me because i have an exam in a couple of days
i wrote a program in mikroc, which gets a character by USART and starts 4 leds (actually there are 2 motors, but for the simplicity i removed that circuit). i used interrupts and delays.
the problem is that if i limit the current to a very low value, even the leds don't light, but they blink rapiddly according to my program. so they work ok.
but if i increase the current, they behave strangely. i press (as it is pc controlled) to go left and it remains in left. the same is for right. i press up, it randomly activates left, then a little back so the motors stops, then up again.. i haven't seen a perfect pattern, just that most of the time (not always) left and right are activated at the right time, but they stay forever.
i don't think it's a rf problem (there are rf modules between pc and pic 16f877) because at very low current (<50mA) they blink as they should.
the program i think is good, because in proteus works
it could be that it's not filtered enough? but i put 2 capacitors at the 7805, 2 at the oscillator..
please, once again, help me with an ideea, something. at least to know the cause, if not to solve it.