IM-Me Dongle UART

In this post, I’ll detail how to add a serial port to an IM-Me dongle.

The first thing I did when I got my IM-Me was to try and communicate through the existing Cypress chip. It works, but it’s slow and clunky. I had to treat the channel as lossy and build an ACKing and retry system on top. It’s a hack.

A much better solution is to solder a real TTL level serial port onto the dongle and communicate with it that way.

Modifying the board for serial comms isn’t much harder than wiring on a GoodFET.

Here is an unmodified dongle:

Add an external power source:
On an unmodified IM-me dongle, 5V is supplied over USB. This drives the Cypress’ internal voltage regulator which produces 3V for the CC1110.
I run my boards with the Cypress powered down and I provide 3V directly into the CC1110. I am using a wall-wart and a 3.3V regulator, but 2xAA batteries work fine.
Connect your 3V power supply to ground and 3V on the dongle. The easiest connections are at the positive leg of the through hole capacitor and the GND pin of the USB plug.

Disable the Cypress chip:
It seems that supplying 3V to the board has the side effect of powering up the Cypress chip. It will immediately start writing junk over the SPI lines which will interrupt the serial communications. To disable it, cut or lift the Cypress VCC pin. This is best done by heating the pin with a soldering iron then levering it up with a small screwdriver.

Add serial:
Connect a standard 3V FTDI-type cable to the Cypress pins marked MOSI and MISO. MOSI is transmit and MISO is receive.
Connect the ground pin of your serial cable to GND on the board.

For reference, this may be useful (Note that most of the thin green wires connected to the Cypress won’t be needed)

Once the board is modified - here’s a test firmware image:


Then, erase flash dongle.hex

Connect to the serial port at 115200 8-N-1

Driving the UART from C using SDCC looks like this:

void uart0rx_isr(void) __interrupt URX0_VECTOR
    URX0IF = 0;
    // read U0DBUF and do something with it...

void uart_init(void)
    P0SEL |= BIT5 | BIT4 | BIT3 | BIT2;

    U0CSR = 0x80 | 0x40;    // UART, RX on

    U0BAUD = 34;    // 115200
    U0GCR = 12;

    URX0IF = 1;
    URX0IE = 1;

void uart_putc(uint8_t ch)
    U0DBUF = ch;
    while(!(U0CSR & U0CSR_TX_BYTE)); // wait for byte to be transmitted
    U0CSR &= ~U0CSR_TX_BYTE;         // Clear transmit byte status