[En-Nut-Discussion] UART0 receive problem

Harald Kipp harald.kipp at egnite.de
Wed Jun 10 19:31:49 CEST 2009


Prasad.Nagapati at infineon.com wrote:

> I need a help, basically I want to tap the I/O  line between a smart
> card and smart card reader.
> 
> For this I am using JNUT board 1.3H, where I want to connect the UART0
> Rx line to the above mentioned I/O line.
> 
> What is the extra circuitry I need to Tap this I/O line.
> 
> Is it sufficient to connect the I/O line from smart card via a pull up
> resistor to the Rx pin of UART0? Or there is a level shifter is
> required?
> 
> Smart card also works in the +5V,

If the smart card interface is 5V then you simply connect expansion port
pin 39. And, of course, GND (pins 5, 6, 7 or 8).

First problem:
You need to remove R18, otherwise the RX output of IC6 will work against
your smart card and one of them will become damaged sooner or later.
This is an intentionally larger SMD resistor, so it shouldn't be too
difficult to remove it.

Second problem:
Needless to say that, after removing R18, your receiver at the DB-9 is gone.

Third problem:
When programming the board, you need to remove the new connection at pin
39. Otherwise programming will fail.

To avoid all these problems, why not use UART1 and connect the smart
card to expansion port pin 57?

Here's the expansion port layout
http://www.ethernut.de/en/hardware/enut1/ports.html
(Do not mount R33! This is for UART1 routed to the DB-9 only.)

For the software use

NutRegisterDevice(&DEV_UART1, 0, 0);
fp = fopen(DEV_UART1_NAME, "r+");
fread(fp,....);

The big advantage is, that you don't need to modify the hardware and
UART0 at the DB-9 connector is still available.

Harald




More information about the En-Nut-Discussion mailing list