• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Programming the code for receiving binary data

Skillet49

Senior member
I'm working on a senior design project and the only part of our project we have left to finish is the code for the receiver.

We are using a PIC12F683 chip and at the moment we are transmitting serial data with the NRZ(L) standard.

We are trying to write the code in C to receive the data, but we don't exactly know where to start.

Does anyone have any experience programming in C for such a receiver? I can't imagine the code being super complex, but we are a little dumbfounded at the moment.

Thanks
 
Assuming the data is coming in over a serial port, you need to have a method that reads the I/O buffer for the post.

When to read the buffer can be interrupt driven , polling or just hanging a I/O read command to the port with an unlimited timeout.

Data will be placed into a buffer that you have assigned to the I/O read.
Copy that buffer to a new buffer as soon as the read completes and pass the new buffer (as a pointer) around; removing it when no longer needed
 
Back
Top