DerStrom8
Super Moderator
Update: When I went to "file Registers" window of the debugger (not) "Special Function Registers" I get 0,1,2,3 ASCII character. Seems to be working in the "File Registers"
I guess I don't know how to change the value of PORTB inside "Special Function Registers" but with this new code it seems to work now. When viewing the "File Registers"
Right, I don't think you want to use the SFR window, you do want the File Register (I think--it's been a while).
Edit: It doesn't change when I have () or ' ' around case: or PORTD ' ' the "File Registers" show the same result as above.
Just checking, we are talking about {}, not (). Brackets, not parentheses. Instead of
Code:
case (0):
{
PORTD = '0';
}
it should be
Code:
case (0):
PORTD = '0';
break;
Oh, and you MUST have a "break" statement. I don't know why you took that out.