PIC programming

Peter Korsten EMAIL HIDDEN
Wed Jan 28 18:29:10 CET 2009


Søren Knudsen schreef:

>> Not simple serial ports, though, as you might expect; one of them goes
>> to some sort of bus system, where there is no master and any connected
>> device can start transmitting at any moment. There would also be
>> opto-couplers involved.
> 
> What that be i2c or SPI?
> 
> Both of these protocols can be tough to debug if everything doesn't work as you expect (take it from someone who've done bit banged i2c on a pic16f84... (slave only, mind you)).

No, it would be LocoNet and DCC (Digital Command Control). I've yet to 
read through the LocoNet documentation, but from the official documents 
of the NMRA, DCC a high-frequency digital signal of around 20 Volts, 
where '1' bits are a positive and negative component, each somewhere 
around 60 microseconds, and '0' bits are between 110 and almost 10,000 
(!) microseconds. So this requires a tight loop that translates incoming 
bytes from the computer to this signal (it doesn't necessarily have to 
be bidirectional).

The fun thing, obviously, is to make *two* independent devices with one 
PIC. I've seen designs that require two PICs for just LocoNet, one PIC 
solely for the USB interface. But that seems to me a rather inefficient 
design.

> For that price, I would definitely choose the debugging option. Seeing as it affords In-Circuit-Debugging, having the possibility of in-curcuit-programming is of less importance.

OK, thanks! I'll wait for them to become available, then, because it's 
all quite new.

- Peter



More information about the music-bar mailing list