Addressing individual O/P pins. September 19, 2012 09:41AM |
Registered: 11 years ago Posts: 6 |
Re: Addressing individual O/P pins. September 19, 2012 10:35AM |
Admin Registered: 11 years ago Posts: 351 |
Re: Addressing individual O/P pins. September 19, 2012 10:48AM |
Registered: 11 years ago Posts: 6 |
Re: Addressing individual O/P pins. September 19, 2012 10:54AM |
Admin Registered: 11 years ago Posts: 351 |
Re: Addressing individual O/P pins. September 19, 2012 11:00AM |
Registered: 11 years ago Posts: 6 |
Re: Addressing individual O/P pins. September 19, 2012 11:02AM |
Admin Registered: 11 years ago Posts: 351 |
Re: Addressing individual O/P pins. September 19, 2012 11:29AM |
Registered: 11 years ago Posts: 6 |
Re: Addressing individual O/P pins. September 19, 2012 12:59PM |
Admin Registered: 11 years ago Posts: 351 |
function x() @ANSELACLR = 1 @TRISACLR = LED2 | LED3 while comkey?(2) = 0 @LATAINV = LED @LATAINV = LED2 @LATAINV= LED3 wait(200) wend endfThis will work if all the constant values are correct and the pins are connected okay, if not then you need to keep checking, it is very easy to miss something. Try using LATACLR and LATASET instead, look at the current value in LATA, PORTA and in TRISA, is it what is expected? You can do this interactively, that's what makes debugging so easy.
Re: Addressing individual O/P pins. September 19, 2012 08:38PM |
Registered: 11 years ago Posts: 6 |