Projects and Technical Ramblings

Megameter Boards, SMD Soldering and Manchester Encoding!

Leave a comment

A few days ago I received a package from China, with the customary “gift” marking to avoid import tax (no wonder shipping is so cheap). After eagerly ripping it open:


Boards! I have never used iTead Studio before (or designed any PCB at all prior to this one) but the quality is absolutely gorgeous.

This is my first time doing surface mount soldering, but after watching a few YouTube videos I decided to just have at it. I populated the board in stages, testing as I went, but neglected to take photos as I went – oops. Here is its current state:

I have discovered the secret to SMD soldering: flux. Lots of it. Flux is the magic sauce that makes larger packages like TQFPs super easy to do by hand.

The LED hanging off of the logic header is just for debugging purposes. All of the logic pins have 1k series resistors on them (“lazy man’s level conversion”) so it’s safe to just solder it on there.

A few things I noticed about the boards:

  • My silkscreen is in general a little messed up, in particular my logic header markings (must have been late at night when I did that one…)
  • The terminals cover up the V / I/R/C / GND legends
  • I ought really to have a pullup resistor on the flash chip’s CS pin, because I can’t drive that pin high when the microcontroller is reset for programming, at which point I really don’t want multiple devices on the SPI bus
  • Some of the creepage distances are not too great, especially once the terminals were screwed on

After a lot of fiddling about with avrdude I eventually managed to get some code onto the device, and blink that LED. Never before has a blinking LED been so satisfying. I’ve finally managed to get away from the walled garden of the Arduino IDE.

Until the screens arrive, I need some way of getting data off of the device. The hard UART is not exposed through the logic header, so I wrote this function:

void bpmc_send(uint8_t *data, uint8_t count)
    DDRB |= 0x01;
    for (uint8_t i = count; i; --i)
        uint8_t byte = *data;
        for (uint8_t bit = 8; bit; --bit)
            PORTB ^= 0x01;
            if (byte & 0x01)
                PORTB ^= 0x01;
            byte <<= 1;

Let’s take a closer look at that blinking LED waveform.


Looks a bit fuzzy on the rising edge. Enhance!


Hello, world!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s