Thanks Michael, look forward to the white paper. In the meantime thought I would just post a few items gleaned in the interim that may be of help to others grappling with this topic for the first time.
First step is to get the Sharp LH7A400 System on Chip User's guide
- as of 10/7/04 it could be found at:
http://www.sharpsma.com/s...c/LH7A400_splash.htm
To get an I/O pin note that, for example, from Logic's LH7A400-10 Card Engine Hardware Specification that Pin 25 of J1C Connector can be used as either Interrupt 2 (uP_nIRQC) Input or Port F bit 2 I/O
also note that this same pin is available at pin 14 of J16 Expansion Header
(from page 10 of the ZOOM SKD Application Board Schematic)
Using the Sharp user's guide note that the physical address of the GPIO Port F Interrupt enable Register
is 0X8000.0E58. Pin 2 of this register must be set to 0 to disable the interrupts.
also note that physical address of the GPIO Data Direction REgister for Port F is 0x8000.0e34 -
Pin 2 of this register must be set to 1 to make this pin an output
and finally note that the phsical address of the GPIO Data Register for Port F is 0x8000.0e30
setting bit 2 of this register to 1 will make the J16 pin 14 go High and setting bit 2 of this
register to 0 will make the J16 pin 14 go low.
in your Windows program declare the following physical address variables:
PHYSICAL_ADDRESS Gpio_Address = {0x80000e34,0}; // Address for GPIO Data Direction Register F
PHYSICAL_ADDRESS Gpio_PD_Address = {0x80000e30,0}; // Address for Port F data register
PHYSICAL_ADDRESS Gpio_INT_Address = {0x80000e58,0}; // address for Port F Interrupt enable register
declare a variable to get the virtual addresses:
volatile void * gpioPtr;
you can get the virtual addresses for a registier by using a call of the form:
gpioPtr = MmMapIoSpace(Gpio_INT_Address,4,FALSE);
once you have the address you can set a value using an instruction like:
*(DWORD*)gpioPtr |= 1<<2;