vk4tec
 Senior Member
 Joined: 24/03/2012 Location: AustraliaPosts: 239 |
| Posted: 08:09am 25 Mar 2012 |
|
|
|
Hello
One of my dream projects is to be able to handle Syncronous Serial in a PIC
Synchronous serial has a clock, and data not ASYNCH - no stop and start.
It relies on the user to clock in the 1' and 0's ROLL the data and worry about it.
The user should then look for a pattern to "BITALIGN" with the data stream.
In HDLC I think they have an idle character you are to align to, or more importantly, a pattern to lock onto to, then take 8 bits at a time.
I think I can get away with it easily in Assembly langauge.
1. Look for a pin transition on the clock PIN, sample the data PIN
2. Shift and populate the next bit in an 8 bit register.
3. Look to see if that is the pattern we want ( FLAG ? )
4. If yes, then just keep clocking in 8 bits at a time.
I have read the forum and I see some Basic Language BITWISE functions requested.
I think what I would need is like a ROLL or SHIFT function, and an AND operator ?
My aim in the end is to go HDLC SYNCH SERIAL to Ethernet ( UDP )
- Andrew Rich VK4TEC - Edited by vk4tec 2012-03-26 Andrew Rich VK4TEC
www.tech-software.net |