PDA

View Full Version : test software for nmiy031.


hsukiang
03-08-02, 06:23 AM
hi there,

i would like to knw if there is any test program to test if all my port of the NMIY 031 is working.
i m actually facing some problem as all the pins is gving me 6V high at all time.

also i would like to knw if Port 1 is the only port tht can be used? coz its the only one tht is not latched.
can other ports (designated for LCD and keypad) be used as an I/O pins?

plz help...thank you

nmitech
03-08-02, 09:55 AM
1. You can use the monitor command to toggle I/O on PORT1,

T 00 0090 ( force P1.0 - P1.7 low )
T FF 0090 ( force P1.0 - P1.7 high )

SmallC library also included PORT1. C driver with the following functions,
p1peek() (Read data from PORT1)
p1poke(data) (Write data to PORT1)

2. PORTA dedicates for input only.
PORTB dedicates for output only.
Both PORTA & PORTB are sharing the same address, 0xFFFC. Also Half of PORTA and half of PORTB are used for keypad data scan. If you don't use keypad, You still be able to use entire 8-bit of PORTA and 8-bit of PORTB for Input and Output respectively.