Posted: Mon Nov 28, 2005 5:15 pm
Hi arney,
I hope that you won't have to keep working on it too long and that we will hopefully get somewhere. Do you have an oscilloscope? I suggest that we go down on the pins and see what is actually happening. Also, at this point, how is the LCD acting, do you at least see 'H and 'I' (lots of them) and only the '2' and '3' are the ones you do not see, or you see some of the '2's and '3's but not as often as you expect?
Also , please try in the ISR:
With the above code, you should see RA1 toggle every single time the button is pressed. If you do, then there should also be activity on the TX pin thus sending the character to the LCD.
I hope that you won't have to keep working on it too long and that we will hopefully get somewhere. Do you have an oscilloscope? I suggest that we go down on the pins and see what is actually happening. Also, at this point, how is the LCD acting, do you at least see 'H and 'I' (lots of them) and only the '2' and '3' are the ones you do not see, or you see some of the '2's and '3's but not as often as you expect?
Also , please try in the ISR:
Code: Select all
void HighISR (void)
{
unsigned char temp;
if (INTCONbits.RBIF == 1)
{
if (SW2 == 0)
{
writeLCD('2');
//debug
if (LATAbits.RA1) PORTAbits.RA1 = 0;
else PORTAbits.RA1 = 1;
// debug
}
// skip SW3 for now
temp = PORTB;
INTCONbits.RBIF = 0;
}
}