Nerd Ralph writes: I’ve written a few software UARTs for AVR MCUs. All of them have bit-banged the output, using cycle-counted assembler busy loops to time the output of each bit. The code requires interrupts to be disabled to ensure accurate timing between bits. This makes it impossible to receive data at the same time […]
Tag Archives: UART
Building a better bit-bang UART – picoUART
Ralph Doncaster writes, ” The screen shot above is from picoUART running on an ATtiny13, at a baud rate of 230.4kbps. The new UART has several improvements over my old code. To understand the improvements, it helps to understand how an asynchronous serial TTL UART works first. Most embedded systems use 81N communication, which means […]
App note: I/O emulated UART baud rate calibration
Software/bitbang method of baud rate calibration for micro without built-in UART, App note from Holtek. Link here (PDF) Not every HOLTEK MCU contains a Universal Asynchronous Receiver/Transmitter function, otherwise known as a UART. If this function is required, it can be emulated using software. However, the software accuracy will change according to the system frequency […]
Hacking a UART where there never was before
Thanks to Andrew for sharing – check out the full post on their blog, MOAM Industries. As part of a prototype developed 12 months ago I was tasked with reading measurements from a blood pressure cuff [sphygmomanometer] in real time. Not surprisingly there are no consumer level devices that have a serial interface because what […]
One wire control of HD44780 LCDs
Does the minimum 6 pins needed to control an LCD give your little microcontroller a sad? In the forum we’re discussing low pin-count control methods for common HD44780 parallel displays. This one uses is a simple serial UART adapter similar to our USB and Serial LCD backpack: Here’s a reasonably economical 1-pin Serial interface solution. […]
App note: Full-duplex software UART for LPC111x and LPC13xx
Here is an app note with source code describing how to implement a full-duplex software UART interface on LPC111x and LPC13xx microcontrollers. However, some applications require more UARTs than are available on the device. While the addition of an external stand-alone UART IC could be used in some of these situations, software based UARTs result […]
Read a GPS module with the Bus Pirate
You can use your Bus Pirate to read a Fastrax UPS501 GPS module. Since the module has a UART, just connect the RX and TX pins, and set the Bus Pirate for UART mode. The correct settings are UART, 9600 baud, 8bits, no parity, one stop bit, receive polarity 1, and a normal output type. […]
App note: Using UART Auto-Baud detection on dsPIC30 digital signal processors
Here is a app note from Microchip describing how to implement the Auto-Baud detection for UART operation on dsPIC30 digital signal processors. This function is useful when the oscillator of the dsPIC is unknown and/or the baud rate is unknown. All current dsPIC30F devices have a UART peripheral with Auto Baud capability. The signal on […]
Simple USB to UART adapter that works with 3.3V and 5V UART signals
The serial UART is a common interface used by many chips and devices. Ginpb designed a USB-to-UART adapter that works with 3.3V and 5V UART signals. The device is based around the FTDI FT232BL USB-to-UART IC with an added 3.3V power supply. The different interface levels are selected by an on-board jumper. Via the forum.
Save to a microSD cards with simple serial protocol
This is a UART driven microSD module that supports cards with up to 2 GB of storage. It stores data using the FAT16 file system, so any computer can read and write files to the cards too. It’s controlled with simple serial commands from a microcontroller. Most micro-controllers have small and limited on-chip memory. For […]
Setting up UARTs on several micros
Brian from teho Labs wrote a tutorial on how to setup serial UART communication on various microcontrollers. UART code examples for the Arduino, ATMEGA168, MSP430, STM32, and LM3S are provided. From his nice writeup it is easy to see why the Arduino is so popular. Being a library based platform, only two lines of code […]
Bus Pirate UART mode demonstration
HamRadio2008 demonstrates the Bus Pirate in UART mode. He is using a PIC18F45K20 MCU to read temperature data from a I2C sensor and then sends it over the UART to the computer serial port, via the MAX232 RS232 level converter. The Bus Pirate is used to monitor the UART signal coming from the board to […]
Implementation of UART transmitter in Verilog HDL for Spartan3 FPGA
If you’re experimenting with FPGAs its helpful to know how various common tasks are coded. Here is an article by M. Yasir explaining how to code a UART transmitter in a Spartan 3 FPGA. The tutorial uses the Verilog hardware definition language.
NEW PRODUCT: MCP2200 USB to Serial breakout board
The MCP2200 is a new USB to serial converter chip from Microchip. Our MCP2200 breakout board brings all the pins to bread board friendly headers. USB CDC virtual serial port interface Secondary HID configuration interface Up to 8 additional IO 256bytes user EEPROM TX/RX indicator LEDs All pins to bread-board friendly header Open source (CC-0) […]
Bus Pirate Mind-Reading Mode?
Mike Donovan suggests that a USB version of Zibri’s Force Trainer interface hack could be done with a Bus Pirate. Substitute the MAX RS232 serial converter with a Bus Pirate in UART mode configured for 57600, 8/N/1 : “call it Bus Pirate Mind-Reading Mode”. View output in the terminal, or start the transparent UART bridge […]
MIDI mode merged into UART library
The next Bus Pirate firmware release merges MIDI into the UART library. MIDI is just a specific serial protocol over a UART at 31250bps, 8/N/1. The latest nightly build adds option “10) 31250 (MIDI)” to the UART speed options. This also applies all the recent UART mode fixes to MIDI without duplicating code. If you’ve […]
UART mode updates
See the latest version in the documentation wiki. UART mode requires special handling compared to the other Bus Pirate modes because data can arrive at any time. Displaying data as it arrives is a unique challenge because it has to be converted to ASCII and sent to the user terminal. Each incoming byte takes about […]
Bus Pirate: Binary UART mode
See the latest version on the documentation wiki. The Bus Pirate’s new binary modes provide a consistent, logical way to script actions from Python, Perl, etc. We already introduced the new binary bitbang, SPI, and I2C modes. This post outlines the binary UART functions. A UART is like a PC serial port. Binary mode will […]
Bus Pirate: Chip demonstrations
Here’s a comprehensive list of Bus Pirate chip demonstrations. It includes Ian’s old demonstrations from Hack a Day, and the most recent demos from Dangerous Prototypes. Tutorials are arranged by Bus Pirate hardware version. Bus Pirate v2&v3 Firmware v0g new feature demonstration PCF8563 real time clock calendar (I2C) ShiftBrite with A6281 3 channel LED driver […]
