Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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.

generating 1 pulse per second from serial port

Status
Not open for further replies.

bizoo

Member level 5
Joined
Jun 22, 2005
Messages
90
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,057
send pulse serial port

HI
I am workin in Linux and want to generate 1 pulse per second from my serial port.
i am in need of pointers for that.

cheers!
 

1 pulse per second

Hi,
Windows needs a driver to directly play with ports and I would assume Linux do to (I've never done Linux before), otherwise your question is trivial.

In this case the idea is to use the stock driver and as such do a "proper" serial communication.
For example, you could set the port at 110 baud, 8 data, no parity and 2 stop bits (equating to a total of 11 bits per sent byte) and send continuous (it's important to not let the line idle) stream of zeroes .
In this case you should get "exactly" 10 pulses / second, which you might divide externally if needed.

Another example would be to let the line idle and send a break (comprised of at least 12 bits of zero, but the hardware takes care of that) with your desired frequency (once a second).

Note that in the first example the port's clock is used (might not be derived from the CPU clock), while in the second you can either use the RTC or the CPU's clock.
(This is relevant in case this is related to your previous post of synchronizing PCs.)

Arthur
 

send pulse port serial

Notice that Serial ort Send Data In ASCII Code.

Have luck....
 

Hi,
There would be many ways to do it in Linux. One way would be to use the QExtSerialPort class and QT libraries to access the serial port. You can then generate the 1-pps through a simple timer mechanism. You can then turn on/off any of the handshake signal line (eg RTS) and get the 1-pps on your serial port. Please note that the serial port output is not TTL compatible and you would require some hardware to convert it to TTL levels before connecting it to any external device.

Regards,
Anil
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top