Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Non-USART Serial Interface

Not open for further replies.


Junior Member level 3
Jan 26, 2011
Reaction score
Trophy points
Activity points
Hi all,

Im trying to implement a serial interface using a clock, Dout and Din on a PIC16F628A connecting to a HTRC110 RFID front end Ic, the HTRC has a non-usart type serial interface.

What is the best way to generate the clock for both devices? should i use the PWM on the PIC?

Can anyone point me in the direction of an example of how to create a serial interface of this or a similar type?



Sincronous comunications drivers are reasonable easy to perform ( I assume you´re using C compiler ).
The clock is generated from master device ( microcontroler ), and data is aquired from slave acording the timing providen from master device.
Note that at this kind of comunication the baud rate doens´t need to mach an exact value, because clock transitions is what determines data progress.

Take a look here, wich can helps you :


There really is no *best* way of generating the depends on the application. Using the PWM is definitely the easiest to setup, which makes it great for controlling motors, but it's harder to control if you're reading in data while clocking. It might be best to write a software routine for this.

PWM is great for clock generating but dor SPI communication(as nodee needs) is not necessary. It can be done by SW very easy. SPI communication accept wide rande of clock frequencies.

Ive managed to do it using the PWM 50% duty at about 2.5kHz. It works by waiting for the PWM timer to overflow (each rising edge) then setting another timer to count to 3/4 of the PWM period and the change output to the next data bit. works quite well, as I can turn the PWM on and off easily as and when I need to transmit.

Not open for further replies.

Part and Inventory Search

Welcome to