Receiving low frequency square wave fm question

I am looking at circuit design to use for model railway DCC design, specifically how to design a circuit to receive and decode it. The data is transmitted serially as FM data at approx 9600bps on a differential (RS485 I think) line where a 1 bit is a positive and negative half cycle of no more than 64uS and a 0 bit has half cycles in excess of 70uS. The current designs I have seen use a PIC to decode the data by sampling 22uS time slices and using the number of time slices to calculate whether the current data is a 1 or a 0 but this appears overly complicated since the data cycles are of a defined duration. Does anyone know if there is an IC (or combination of ICs) that can be programmed simply to receive this type of FM data and decode the bytes which could then be passed in parallel to a PIC for the functional decoding? You can assume that the electrical line is already received to produce a TTL signal of the incoming data (i.e. between 0 and 5v instead of differential). I have seen many flavours of UARTs but these don't seem to work with modulated signals, only with unmodulated serial data.

Thanks in advance

Luke

Reply to
Lukos
Loading thread data ...

This is exactly the sort of application for which a PIC (or other simple uC) is suited. It couldn't be much simpler.

-- Joe

Reply to
J.A. Legris

Well, it's a little more complicated than that. 0 bits can be stretched into extremely ugly shapes and 1 bits aren't whole lot better. It'd be pretty tough to do this without a microcontroller. I'm not saying it couldn't be done, but I'd bet that any single chip solution you find that can "just do this" is going to be a pre-programmed micro of some sort. All in all it's a pretty ugly way to do things IMO, seems like they could have come up with something a little more backwards compatible.

Yes, a micro can be programmed to do this, but you already know that.

I'm curious as to why that is. Are you hacking something? ;-)

Reply to
Anthony Fremont

No, it was just I didn't want someone to waste their time explaining about the decoding of the bus into a TTL digital system since I already know how to do that with RS485 receivers etc.

I want to build my own accessory decoders since the pre-manufactured ones are quite pricey for what they are and you need loads of them for a reasonable sized layout. Also I am trying to build some memory wire point motors which cannot be driven directly from a standard accessory decoder - I will use a regulator configured as a constant current source for each wire.

Thanks for everyone's help - a PIC it is then : )

Luke

Reply to
Lukos

That's what I would likely do. Aren't there any cheap pre-programmed PICs out there? I looked a little, but didn't find anything. Heck nowadays you can even find OBDII interface chips (PICs) for under $20, but I guess even that might be pretty steep for you if you need a bunch.

From what I've been able to find, you won't need any specialized level converters just to receive data. It looks like four diodes to recitify the voltage from the tracks for a power supply and you can pick the DCC straigh off one of the rails. You might like this page:

formatting link

Reply to
Anthony Fremont

You might want to look at the UK Model Electronic Railway Group:

formatting link

They produce kits for various DCC functions, and I'm sure if you join you can participate in the designs.

Reply to
Paul Burke

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.