- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to use UART in smartcard mode which connects to another chip requiring a TX/RX pin and a clock pin. How do I configure the clock pin to be output to the other chip? PSoC Creator creates a rx_tx pin only. Also the other chip supports T=0 and T=1 mode. What mode does PSoC support?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
JeHu,
The NXP datasheet gives you much of the necessary information.
By the example given in the datasheet, if you use CLK = 1.5MHz and Fi=372 (who knows where that comes from) and Di = 1 (again who knows) then your UART needs to be set to 4032 baud 8N1.
Len
Here's a circuit that should implement the physical protocol at 4032 baud (bps). You have to come up with the SW for the protocol.
Attached is a Creator project.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
JeHu,
Do you have a smartcard interface spec to work with?
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to duplicate the smartcard reader function from this document:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
JeHu,
I looked at the NXP spec. Sadly, they don't show the timing relationship of the CLK to I/O.
Looking over the document, I believe a two-wire SPI comm is a better fit.
You can set up the SCB to SPI with half-duplex (SPI_MOSI tied to SPI_MISO becomes I/O) and pass the SPI_CLK becomes CLK.
Since NXP did not specify the relationship of CLK to I/O timing, you'd have to empirically determine the CPOL of the SPI.
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello JeHu_3414236
In order to get a clock output from the PSoC, you can use a T Flipflop and provide it with a clock that is twice the required clock output.
Something like shown in the figure below:
In the above case you can route the PWM_Clk to a GPIO pin. Connect the clock input of the other chip to this GPIO to get the required clock.
Best Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do I need to use the same clock for the other chip as input to the PSoC UART so both sides are synchronized? If so how do I do it? I can select the Enable Clock from Terminal option for UART to enable an input port but I don't know how to connect either Clock_1 or PWM_Clk to it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
JeHu,
The NXP datasheet gives you much of the necessary information.
By the example given in the datasheet, if you use CLK = 1.5MHz and Fi=372 (who knows where that comes from) and Di = 1 (again who knows) then your UART needs to be set to 4032 baud 8N1.
Len
Here's a circuit that should implement the physical protocol at 4032 baud (bps). You have to come up with the SW for the protocol.
Attached is a Creator project.
"Engineering is an Art. The Art of Compromise."