LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VHDL code with Serial Input

I would like to use an NI 9870 Serial Module as an input source for a Component Level IP block. I would like to use the read byte method for the NI 9870 at a baud rate of 9600. Should I use a counter in VHDL to cut the 40MHz on board clock down to 1200Hz or is there a better way to determine when a byte would be ready?

0 Kudos
Message 1 of 3
(2,406 Views)

Hello imr,

 

If I understand your problem correctly, you seem to be looking for a read solution with the 9870 that transmitts data to a CLIP of yours at a specified rate. Firstly, I would suggest to look at http://zone.ni.com/devzone/cda/epd/p/id/6366 which has an example project for serial transmissions with the 9870, then I would develope an enable bit for your data transfer to the CLIP. A counter would be a good way to achieve a loop rate that would would allow you to synchronously pass data to the clip relative to your baudrate.

 

Best,

Blayne

0 Kudos
Message 2 of 3
(2,359 Views)

Hi Blayne,

 

Well the rate doesn't need to be specified, it is a function of the serial transmission speed. A design that took any speed input from the serial read function would be preferred. The example is good, except that I don't see how repeated characters make it into the FIFO when the only input is the integer from the read function and nothing else. I think I am going to try a solution with a target based FIFO that collects the data, and a CLIP that looks at the buffer size and reads if it is greater than 0.

0 Kudos
Message 3 of 3
(2,348 Views)