DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

EDE300 View Datasheet(PDF) - Unspecified

Part Name
Description
Manufacturer
EDE300 Datasheet PDF : 9 Pages
1 2 3 4 5 6 7 8 9
char receive()
{
char value;
value = inportb(0x3F8);
while ((inportb(0x3FD) & 0x20) == 0);
outportb(0x3F8,0x32);
while ((inportb(0x3FD) & 0x01) == 0);
value = inportb(0x3F8);
return (value);
}
/* receive one byte from EDE300 */
/* stores incoming byte */
/* flush input buffer */
/* hold until transmitter is ready */
/* select 'send byte' on EDE300 */
/* hold until a byte is received */
/* receive byte from EDE300 */
main()
{
bioscom (0,0xE0|0x03,0);
/* main program loop */
/* set 9600 BAUD, 8 bit data */
do
{
value = receive();
send (value);
}
while (value != 0);
}
/* read byte from EDE300 into 'value' */
/* write 'value' back to EDE300 */
/* exit if 'value' = 0 */
This program reads one byte from the '245 via the EDE300 and writes the same value back
to the '373 via the EDE300. This is a very simple example - it is intended only to illustrate the proper
use of the EDE300's Host Control Mode. Notice that the subroutine 'receive()' returns one byte of
data from the EDE300, and the subroutine 'send(value)' transmits the byte stored in value to the
EDE300. In this example, the BAUD rate does not need to be set from the command prompt; it is set
to 9600 BAUD in software.
BASIC STAMP CONNECTION
The EDE300 can make a very effective I/O expander for the BASIC Stamp™ or other
microcontroller devices capable of transmitting and receiving serial data. In order to keep from
overrunning the Stamp with data from the EDE300, it is recommended that the EDE300 be used in
Host Control Mode when used with the Stamp, whether you are performing unidirectional input,
unidirectional output, or half-duplex bi-directional I/O. This way, the host (Stamp) controls when it
will receive a byte and when it will transmit a byte.
Bi-Directional Communication with BASIC Stamp™ I
To use the EDE300 with the BASIC Stamp™ in a bi-directional arrangement, refer to the
schematic in Figure Four, above. As the EDE300 can communicate with a Stamp using standard
+5V signals, no voltage level converter (MAX233) is needed for the connection. Simply remove it
from the schematic shown in Figure Three, and wire in the Stamp as follows:
Stamp Pin 7 <-------> EDE300 Pin 17 (Serial Receive)
Stamp Pin 6 <-------> EDE300 Pin 18 (Serial Transmit)
Then connect the EDE300's BAUD Pin (Pin 2) to GND instead of +5V as is shown in the example
for connection to a PC in Figure Four. This will tell the EDE300 to communicate at 2400 BAUD
instead of 9600. Also, you will need to connect the Stamp's ground pin to the EDE300's ground pin.
COPYRIGHT © 1996 E-Lab Digital Engineering, Inc. All Rights Reserved. Page # 6

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]