Oh, thanks. I am glad you can't see my red face!
Russ,
Try an experiment with the delay timing.
1) HIGH PORTB.6
2) PAUSE 1000
3) HIGH PORTB.7
4) PAUSE 1000
5) LOW PORTB.7
6) LOW PORTB.6
7) pause 1000
8) GOTO LOOP
I've not tested this, but logic states that PORTB.6 goes high, waits a second, then PORTB.7 will go high, waits a second then both PORTB.6 & 7 goes low, waits a second then loops round.
It will prove the the program is actually turning on and off the ports, and then you can play with the timing to get the desired effect you're after. As Paul stated, unless you have really keen eyesight, 1ms is very hard to see. Blink and you'll miss it![]()
What is connected to PortB.6 ?
Maybe you struggled into the read-modify-write-trouble...
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Portb.6 connects to a 1K resistor and NPN base. My original post was a logical error, the basic problem that I was trying to solve, was that portb.6 was not producing an output sometimes. It turned out that the 5 volt supply was sagging after 4 seconds causing brownout reset. I was confused by the program running so long before failing.
Bookmarks