Would anyone lend me a source code on preamble and sync byte transmission= and reception? Maybe that could help me very much. Please help me, anyone. I know that someone out there would understand me= , again. Thank you to all. D Lloyd wrote: Hi, I've never done this kind of thing before, but it sounds like you need so= me kind of state machine with a sequence detector for the preamble..... Once you detect a correct preamble (which I presume is just shifting seri= al bits in and matching against a known pattern), you switch states to readi= ng the incoming data bit stream and partitioning it into bytes to display on= the LCD....If you dont get a decent preamble.....you wait around in the first state until you do... If you are after code for this, I certainly don't have any but it sounds like a few loops with shifts with a compare. Dan (Embedded "Jose S. Samonte Jr." @MITVMA.MIT.EDU> image moved 21/03/2001 09:49 to file: pic25804.pcx) Please respond to pic microcontroller discussion list Sent by: pic microcontroller discussion list To: PICLIST@MITVMA.MIT.EDU cc: Subject: Re: [PIC]: Would anyone understand...? Security Level:? Internal What my problem sir sir how to receive the preamble and the sync word. In other words, how the receiving part would be able to recognize the preamble and sync byte from the data needed to be shown on the LCD. Peter Betts wrote: > My problems are on the preamble, sync word, and the checksum/ > CRC. Basically, it's packet transmission and reception. Preamble's are just a long string of 1's and 0's to indicate transmission= is about to start. Sync words are just a collecting of 1's and 0's in a specific pattern tha= t is long enough for the receiving system to lock onto (correlate) and synchronise at the appropriate bit rate. Checksum is a Cyclic Redundancy Check and is normally a delay line with XOR'ed taps fedback into the delay line input. (The feedback bit gives yo= u the "cyclic" term) There are many many text books that explain CRC generation. It can be as big or small as you like. If it's a PC you are talking to then I don't know t= he correct polynomial for the CRC in this circumstance. You notice how again you can break this down into smaller and smaller bit= s. If it's a PC you're talking to get the speification of the interface and read it. Then just try a simple terminal program and turn off all fancy handshaking or parity checking. Just try raw data communications. When th= at works try adding CRC (parity) etc etc. Pete -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body ____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=3D= 1 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > --------------------------------------------- = > Attachment:=A0pic25804.pcx = > MIME Type:=A0application/octet-stream = > --------------------------------------------- = ____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=3D= 1 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body