JK
microsystems
Flashlite 186
User’s Manual
6
After the bit(s) are cleared in the PDIR0 register, you can change their state by reading the
PDATA0 register, modifying the bit(s), and writhing out the new value to PDATA0. See the
section “Programming the Ports” for more information.
LED, the LED at location DS1 is controlled by bit 10 of the PDATA1 register at 0FF7Ah. Set the
bit (1) to turn the LED off, clear the bit (0) to turn the LED on.
Ports A - F, 40 bits of I/O, are controlled by a CPLD. The I/O from the CPLD is grouped into
two 4-bit ports (A & B) and four 8-bit ports (C thru F). Each of the six ports may be configured
as either inputs or outputs. The following tables show the port registers, addresses, and
configuration bits.
Register
Address
Port A
0x600
Port B
0x601
Port C
0x602
Port D
0x603
Port E
0x604
Port F
0x605
IOConf
0x606
Ports A through F have a single data register that is read/write. Data read from the port represents
the current state of the port, data written to the port will be present on the port pins, if the port is
configured as an output. Each port may be configured as either an input or an output. Write a 0 to
the appropriate bit in the direction register to configure the port as an input, write a 1 to configure
it as an output. All ports default to inputs.
The CPLD is a low power device that operates from 3.3 Volts. Although the inputs are 5V
tollerant, care must be taken to avoid exceeding the current specifications for the device.
Shorting an input to 5V will damage the CPLD.
Driving Loads with the Ports
The ports on the Flashlite 186 are capable of driving small loads or interfacing to TTL logic
devices. These ports can only source/sink a few milliamps. In order to interface with many loads,
additional circuitry, such as a transistor or relay, will be required. Designing the interface
between an output pin and a higher current load can present a challenge, especially if high speed
is required or the load is inductive in nature.
Hardware
IO Configuration Register (I/O Port 606 hex)
Bit
7
6
5
4
3
2
1
0
Function
Not
Used
Not
Used
Port F
DIR
Port E
DIR
Port D
DIR
Port C
DIR
Port B
DIR
Port A
DIR
Default
1
1
0
0
0
0
0
0
!
Summary of Contents for Flashlite 186
Page 1: ...Flashlite 186 User s Manual ...
Page 2: ......
Page 6: ...JKmicrosystems Flashlite 186 User s Manual iv ...
Page 17: ......
Page 27: ...21 Flashlite 186 User s Manual JKmicrosystems Contact Information ...