NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » How to transmit "01H" (hexadecimal) via UART

February 29, 2012
by jeffspc88mx
jeffspc88mx's Avatar

I'm trying to send codes to my Noritake Itron 7000-seried VFD via UART. The datasheet has things like "01H" and "0AH 1BH n" on it. Do I send "01h" or "0x01"? And for multiple codes in a series, do I send the "0A" then send a "1B" then the "n" value? Or does it all get packaged somehow?

I've been sending "0x01" and getting unexpected characters on my display. I'm actually pretty tickled it communicates at all! Maybe if I learned Japanese :)

February 29, 2012
by pcbolt
pcbolt's Avatar

Jeff -

I think you'd use 0x01, 0x0A, 0x1B etc. For "n" you'd most like just send the decimal value and the compiler converts it automatically. If you're getting odd characters for 0x01, it means you're sending data not commands. The lcd.c file has "set_type_commands" and "set_type_data" functions which simply set or clear a control pin. If you are using 4 wires for data transfer, check out the "write_nibble" function.

Post a Reply

Please log in to post a reply.

Did you know that two resistors plus a transistor can be used to make a better voltage supply? Learn more...