Tag Archives: avr

A full-duplex tiny AVR software UART

via Dangerous Prototypes

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 as it is being transmitted, and therefore the bit-banged implementations have been half-duplex. By using the waveform generator of the timer/counter in many AVR MCUs, I’ve found a way to implement a full-duplex UART, which can simultaneously send and receive at up to 115kbps when the MCU is clocked at 8Mhz.

See the full post on Nerd Ralph’s blog.

μSim: PICmicro instruction simulator

via Dangerous Prototypes

Dilshan has published a new build:

μSim is a lightweight PIC™ CPU and ALU simulator. This simulator supports the PICmicro mid-range instruction set and designed to work on both PC and Arduino platforms.
Compare with most of the other emulators, μSim does not provide all MCU features and peripherals. This simulator design as a minimalistic system, and based on the requirements, it can extend with additional peripherals and features.

See the full post on Dilshan blog.

NRI G-13.mft parallel coin acceptor to Serial adapter

via Dangerous Prototypes

David has been working on an ATmega based USB serial adapter for the NRI G-13.mft coin validator:

The NRI G-13.mft by Crane is a versatile and high secure coin validator. It can be programmed using the propretary WinEMP software and PC interface, or event it has some DIP Switch that can be used to program the device. Unluckily it does not come with a UART interface. But it features a “machine tester” I/O interface we can use to track the inserted coins.

See the full post on Davide Gironi’s blog.

Check out the video after the break.

High-voltage FLASH programming on ATTINY85

via Dangerous Prototypes

ATTINY85 High-Voltage Flash programmer @ td0g.ca:

The Atmel ATTINY85 is a great chip (cheap, easy to use, supported in the Arduino IDE). Unfortunately it only has 5 IO pins, which limits its usability. There are guides on using a High-Voltage Programmer (HVP) to change the Reset pin into an IO pin. However, that prevents you from programming the Flash (Program Memory) until you re-enable the Reset pin.
Thankfully the Flash can be programmed with an HVP, but the commands and protocol are different. My USBtinyISP simply cannot be modified to be an HVP. Using an Arduino as ISP (In-Service Programmer) on an ATTINY85 is fairly simple but doesn’t work if the Reset pin is disabled.

More details at td0g.ca. Project files available on GitHub.

MCP4141 based digital potentiometer

via Dangerous Prototypes

Dilshan Jayakody has been working on an open-source hardware project MCP4141 based digital potentiometer, that is available on GitHub:

The main objective of this project is to create an experimental prototype of a digital potentiometer using Microchip’s MCP4141 IC. MCP4141 is available with end-to-end resistances of 5KΩ, 10KΩ, 50kΩ, and 100KΩ. This potentiometer-module can drive MCP4141 with any of the above mention resistances.

AVR high voltage programmer 2

via Dangerous Prototypes

Dilshan Jayakody posted an update on his AVR high voltage programmer project we covered previously:

AVR-HV2 is Arduino based high voltage parallel programmer for AVR microcontrollers. This programmer can read, write, and erase both flash memory and EEPROM. Also, this can use to set fuse bits of AVR MCUs. Compare with the previous version of AVR HVPP, this design is based on commonly available components with a simple schematic. In this release driver software is also rewritten to provide cross-platform support.

More details on Dilshan Jayakody’s blog. The design files are available on GitHub.