I have my z88dk development environment up and running and I've been writing some sample code and running it on my SC126, but I can't quite figure out how to address the onboard LEDs. As far as I understand it, all I have to do is write to memory location 0x0D a value between 0x00 and 0xFF.
Here's what I've tried:
while(1==1) {
int volatile * const p_reg = (int *) 0xD;
*p_reg = 0xFF;
}
I also tried this:
while(1==1) {
char *a = (char*) 0x0D;
*a = 1;
}
When I run the program, it flashes the first LED, but then nothing else happens (that's why I put it in an infinite loop).
What am I misunderstanding? Is it possible to write to peripherals using C and the z88dk?
Thanks,
Michael Earls