2005-09-22 09:01 PM
programming the control register (st7538)
2005-01-18 01:11 AM
I have changed the sensitivity mode (from 0 to 1) and now the
synchronization is correct but the received bits are wrong. Sometimes there are 9 clock bits, sometimes 8 ??? The received bit design is not always the same!2005-01-18 01:48 AM
Quote:
On 18-01-2005 at 14:41, chiptuner wrote: I have changed the sensitivity mode (from 0 to 1) and now the synchronization is correct but the received bits are wrong. Sometimes there are 9 clock bits, sometimes 8 ??? The received bit design is not always the same! You found something I can´t describe as a BUG or as a FEATURE, but. The time the ST7538 takes to detect the carrier is the same time it takes to detect that the carrier is gone! This leads to something like receive 9 bits for 8 bits sent, because after the 8th bit sent, the sender stop producing the carrier. But this is not instantly. Because of unknown reasons the receiver can recover 9 bits, or 10, or 11... :o What I do is send message as blocks, because the extra bits are always in the end of the last byte of the message block. So, I have range of valid number of bytes for valid message blocks. This validation refuses the extra undesired bits received. :-] Did it help?2005-01-18 07:40 AM
Hi,
I have the same problem. I made an experiment: St7538 at 132.5kHz, 2400 baud, Carrier detection with conditioning, synchronous. I tried to receive only one byte. So I have the clock CLRT only when I received the byte. I recognise the byte by reading the RXD line on rising edge but at first i verified if the CD/PD = 0 (this is usefull at other mode like carrier detection without conditioning when I have clock CLRT all the time). What I see on the oscilloscop: Sometime I have 9 clock, sometimes 10 clock. When I have 9 clock: first 8 is data (on the rising edge) and the last is unusefull. When I have 10 clock, first is unusefull, then 8 is data, and the last is bad. One more problem: In both case at the last clock (what is bad) sometimes I have CD/PD = 0 and sometimes = 1. I think (not sure) this is from detection time because when I modified this time the CD/PD is not the same and I receive the data clock but with CD/PD = 1. The problem is the same for N byte. I receive: N*8+1 or N*8+2 clock CLRT (with the last one on rising edge sometimes with CD/PD = 0 or 1). Tomorrow I hope to make other test! ;)2005-01-18 07:46 AM
I am always verifying CD/PD!
I never read a bit if CD/PD = 1 :-] :-] Rafael Krapf BRASIL2005-01-18 07:18 PM
Thank you for your tip, but my problem is that I don't know when the first bit of my message appears. Sometimes it is catched at the second edge, sometimes the first two clocks are my first bit, so I can't say that the invalidly bits are always at the end!
2005-01-18 07:36 PM
Hi,
One possible method: Start a timer at the falling edge CD/PD 1->0. If you receive the first clock with the timer stoped or the time Tb/2 then this is correct bit and the next 7 bit is correct.2005-01-18 07:52 PM
Hi,
Maybe TB/2 is not the correct time :-Y2005-01-18 11:50 PM
Hi guys,
Really, the carrier detection or preamble detection of ST7538 is very poor in quality. This means that I actually NEVER have sure about WHEN is the first bit. :-Y . How, then, did I managed to find my message in the received bits? :-Z I made my own preamble detection in software! :) :D ;) I send a fixed FIRST byte for every message. Every received bit is SHIFTED IN to a byte variable, when the byte variable is equal to the fixed first byte of the message, then every bit following this byte is a valid message! Hey guys, don´t forget: You have the power of software at you hands. anything can be made with this power!!! :-] :-] :-] Rafael Krapf BRASIL2005-01-19 01:22 AM
Hi Rafael,
can you tell me what detection method you used? (also baud, frequency...) Thank's2005-01-19 01:30 AM
Quote:
On 19-01-2005 at 14:52, flo123 wrote: Hi Rafael, can you tell me what detection method you used? (also baud, frequency...) Thank's Of course! I am still changing somethings, as I am in the search for better communication setup, but the system today is working with: BAUD: 1200 FREQUENCY: 76 kHz, 82.05 kHz and 86 kHz (changed on the fly) FREQUENCY DETECTION TIME: 500 usec DETECTION METHOD: Preamble detection without conditioning INTERFACE: synchronous SENSITIVITY: High sensitivity INPUT FILTER: Enabled Rafael Krapf BRASIL