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.

How to read 16 data bits through PIC Usart??

Status
Not open for further replies.

alan007

Newbie level 4
Joined
Feb 11, 2013
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,313
Hello..
I'am using a module that outputs 16 bits of data that i want to read using my PIC...
Functions to read and write data to USART module of PIC reads/writes one byte(i.e, 8 bits) of data at a time...
Can i read all these 16 bits in one go?.(I dont want any my data bits to be counted as stop bits..)
I'am using MikroC compiler....

Thanks in advance..
 

I don't THINK (could be wrong) you can use the USART for 16 bits. But you could use a general purpose pin and write your own interface routine-it's not that hard. What's the coding for your sixteen bits? Do you have stop and start bits?
 

I haven't written the program yet.I found that the usrt_read() function of mikroc read incoming serial data as bytes(i.e,8 bits)
The module that I'am using is..
**broken link removed**
 

That data sheet has about as much information as a box of rocks. It looks like it outputs data as 'normal' 8-bit data. (i.e. 1 stop bit+8data+???) Does it have parity? How many stop bits?

So my guess would be that 16 bit data is sent as two 8-bit messages. Maybe you can just hook up the output to an oscilloscope and take a peek at it.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top