Searching \ for '[PIC]: Re: 16f628 and i2c; 16f628 with internal o' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/i2cs.htm?key=i2c
Search entire site for: 'Re: 16f628 and i2c; 16f628 with internal o'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Re: 16f628 and i2c; 16f628 with internal o'
2002\07\03@165819 by ar=E3es?=

flavicon
face
Hi,

   It you use a bitbang software UART you can measure the start bit
duration and use it as a reference for other bit's position. That way you
can compensate for variations on the clock caused by temperature changes.
The temperature changes are usually not too fast. With the hardware uart you
better use a resonator...

Best regards,
Alexandre Guimaraes

>         And when temperature forces the transmit and receive frequencies
far
> enough apart that checksum fails, you just keep detecting the failure of
> acknowledgement and retransmitting until the temperatures get back in
> range (perhaps the next day when the sun comes up).
>
> Harold

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\07\04@075720 by Olin Lathrop

face picon face
>     It you use a bitbang software UART you can measure the start bit
> duration and use it as a reference for other bit's position. That way you
> can compensate for variations on the clock caused by temperature changes.
> The temperature changes are usually not too fast. With the hardware uart
you
> better use a resonator...

You can only use the start bit for bit duration timing if the next bit has
the opposite sense.  Only the start and stop bits have guaranteed polarity.
It is possible to watch the bits going by and eventually deduce the bit
timing, but not trivial.  If you have a rough idea of the baud rate so that
the start and stop bits can be identified, then it becomes easier.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2002\07\04@104838 by ar=E3es?=

flavicon
face
Hi,

> You can only use the start bit for bit duration timing if the next bit has
> the opposite sense.  Only the start and stop bits have guaranteed
polarity.
> It is possible to watch the bits going by and eventually deduce the bit
> timing, but not trivial.  If you have a rough idea of the baud rate so
that
> the start and stop bits can be identified, then it becomes easier.

   Yes, you are right but in many application you can block the data and
use a know value sync byte. I looked over the application where I used this
and it was in an radio where I had the preamble and always had a known byte
to sync the receiver starting. What I did afterwards was to use a "software
pll" to keep the timing following the timing of the receiving stream. I
looked at all the edges of the receiving stream and used their times to
adjust the counter for the center of the bit position if they where within
certain limits. Easier to do than to explain :-) The code is not very
complicated at all. If the cost is a main concern it can work quite well
this way with the internal oscilattor alone. The baud rate can't be too high
also or the timing counter will be so small that you loose the needed
headroom.

Best regards,
Alexandre Guimaraes

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2002\07\08@142018 by uter van ooijen & floortje hanneman

picon face
>     It you use a bitbang software UART you can measure the start bit
> duration and use it as a reference for other bit's position. That way you
> can compensate for variations on the clock caused by temperature changes.
> The temperature changes are usually not too fast. With the hardware uart
you
> better use a resonator...

And how are you going to detect the end of the start bit when the first data
bit has the same (line) polarity ;(

Wouter van Ooijen
--
Van Ooijen Technische Informatica: http://www.voti.nl
Jal compiler, Wisp programmer, WLoader bootloader, PICs kopen

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\07\08@143225 by Eoin Ross

flavicon
face
Implement a protocol whereby you have a pre-amble byte where that is NOT the case ... temperature related errors won't vary much at all over the course of a few bytes (unless you run at say 100 baud or slower

>>> wfspamKILLspamXS4ALL.NL 07/08/02 01:59AM >>>
>     It you use a bitbang software UART you can measure the start bit
> duration and use it as a reference for other bit's position. That way you
> can compensate for variations on the clock caused by temperature changes.
> The temperature changes are usually not too fast. With the hardware uart
you
> better use a resonator...

And how are you going to detect the end of the start bit when the first data
bit has the same (line) polarity ;(

Wouter van Ooijen

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\07\08@182428 by ar=E3es?=

flavicon
face
Hi, Wouter


> >     It you use a bitbang software UART you can measure the start bit
> > duration and use it as a reference for other bit's position. That way
you
> > can compensate for variations on the clock caused by temperature
changes.
> > The temperature changes are usually not too fast. With the hardware uart
> you
> > better use a resonator...
>
> And how are you going to detect the end of the start bit when the first
data
> bit has the same (line) polarity ;(

   You have to have a sync byte or a preamble. Afterwards you use a PLL
like structure to compensate the timing. I would not try it without some
form of error checking but you usually have a block anyway.

   If you want more details I have "ressurected" an implementation I did
some years ago. I can't give you the code because it was made under contract
but I can tell you more about it. It was a radio system with BIM
transceivers.

Best regards,
Alexandre Guimaraes

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...