Where to learn?

Started by Randy McKenzie June 10, 2008
Where can I find information on programming a PIC using the UART and
decode address and other data?? ( and NOT 9th bit stuff ). Ive read the
Microchip sheets but not clear on what Im doing yet.

I want to use a PC and a 485 network to poll several pics, each with
its own address. Use is controlling signals on a model railroad.

Any help is appreciated!

Trying to learn with a middle aged brain!

Randy
KK4EJ

Randy,

Try some of the PIC'n books, I think there is one on serial communication.
Also, download the demo USART programs from Microchip.

Alan KM6VV
-----Original Message-----
From: p... [mailto:p...] On Behalf Of
Randy McKenzie
Sent: Thursday, May 29, 2008 7:13 AM
To: p...
Subject: [piclist] Where to learn?

Where can I find information on programming a PIC using the UART and
decode address and other data?? ( and NOT 9th bit stuff ). Ive read the
Microchip sheets but not clear on what Im doing yet.

I want to use a PC and a 485 network to poll several pics, each with
its own address. Use is controlling signals on a model railroad.

Any help is appreciated!

Trying to learn with a middle aged brain!

Randy
KK4EJ



to unsubscribe, go to http://www.yahoogroups.com and follow the
instructions
--- In p..., "Randy McKenzie" wrote:
>
> Where can I find information on programming a PIC using the UART
and
> decode address and other data?? ( and NOT 9th bit stuff ). Ive read
the
> Microchip sheets but not clear on what Im doing yet.
>
> I want to use a PC and a 485 network to poll several pics, each
with
> its own address. Use is controlling signals on a model railroad.
>
> Any help is appreciated!
>
> Trying to learn with a middle aged brain!
>
> Randy
> KK4EJ
>

See message 10700 - excellent tutorials
http://www.gooligum.com.au/tut_baseline.html It'll cost you $50 for
the hardware plus a couple of bucks for 12F509 chips. All available
at Mouser.

If you want to buy the various 'PicN books, fine. Just study the
projects but ignore the coding style. It predates the dinosaur.

The tutorials do a MUCH better job of teaching style. By the end of
tutorial 3 you are into separate modules and relocatable code. Just
the thing for sharing or reusing code. Note that the linker is used
starting in Tutorial 1.

If you have a problem getting started (Project Settings, etc.), post
back. I just finished the first 3 tutorials a few minutes ago.

When you have gotten to the point where you can handle the UART,
consider the ROBIN protocol for RS485
http://www.bdmicro.com/code/robin/

Among other things, ROBIN can be a multi-master protocol (collision
detect, backoff, etc) if you wish to implement error recovery.
Otherwise, it is a fast, addressable, multiple slave protocol. Just
the thing for a model railroad.

One issue: ROBIN is implemented on an ATmega128 but it can probably
be ported to one of the mid-range PICs easily.

Acroname sells a USB->RS485 adapter. Now you can use a PC to talk to
your train controls. I have one on order (already shipped). It is
not clear to me that they can talk and listen at the same time and
that feature is important only if you need a multi-master
configuration. If you don't hear what you just said, there has been
a collision. Back off for a random period and try again. That type
of thing...

Richard