I am a student (in my first computer architecture class) doing a basic project with the TCP/IP dev board (using Rabbit 2000) and the Z-World demo board. The sample program demotcp1.com basically turns on/off LEDs 1 and 2 on the demo board.
I am trying to understand the code (which is coming along) but now I am trying to understand how this code is working with the Z-World Demo board. I am reading so many manuals and online documents that I am spinning in circles. I am using the sysio.lib to help guide me with the syntax of the code.
In the program, a line of code reads:
BitWrPortI(PDDR, &PDDRShadow, 0xFF, 0); // turn led on output 0 on
OK, I know it’s writing a bit to Port D data register, and it’s shadow register. I am trying to understand/determine:
- how many ports this board has. Is it ports A-E?
- Is port D for ALL the LEDs (there are 4 of them)? If so, how would I know that? For instance, I want to add a line of code that will turn on LED 3.
- I am confused by parameter 3 for this function. The library file explains that this param is the value to write to port. Isn’t that what param 4 does?
I am such a novice at this and can’t seem to find a starting point to get though what seems to be a simple program.
Thx in advance.