Showing posts with label DCC. Show all posts
Showing posts with label DCC. Show all posts

Thursday, August 22, 2013

A Plastic Sanga Case for my PCB

Soon after ordering the PCB, I came across Seeed Studio’s acrylic laser cutting service. Once the PCB is assembled and tested, it would be nice to have an acrylic case for it.

The current trend for acrylic cases is the plastic sanga. The other option is the case put together with slots and screws. I don’t much like this look so I opted for the plastic sanga.

Ordering PCBs from Itead Studio

The last time I designed and got a PCB ordered was in 2010 and it cost $125 for 5 pieces. As expected, there were a few mistakes in the PCB design and a second batch never got designed.

This time around I found that there were other sources more suitable for hobbyists. The widely mentioned ones were Seeed and Itead. They offered what appeared to be a 50x50mm PCB for $10 which seemed reasonable. But, no, it turned out it was $10 for 10 PCBs! That is like a buck a PCB. This changed the entire way I looked at PCBs.

Monday, July 8, 2013

An Interrupt based DCC Decoder

In the early days of DIY DCC decoders, the preferred method of DCC decoding logic was to write precisely metered sections of hand-written assembly code that sampled the DCC input. These were based on the venerable 16C84 running at 4MHz.

But with modern PICs running at 32 MHz and over, it is possible to write an interrupt driven DCC decoder. This means no more intricately hand-coded assembly. You could write it in C without worrying too much about the code generated - within reason. So what is a good interrupt period to sample the DCC input? OK, 22us. But how accurate does this period have to be? Can we use the internal oscillator in a PIC? Yes, we can!