Coder Social home page Coder Social logo

kaspi314 / picouart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nerdralph/picouart

0.0 0.0 0.0 54 KB

small, fast, and precise bit-bang UART for 8-bit AVR MCUs

Home Page: http://nerdralph.blogspot.com/2020/02/building-better-bit-bang-uart-picouart.html

License: Other

C 21.85% C++ 78.15%

picouart's Introduction

picoUART

small, fast, and precise bit-bang half-duplex UART for 8-bit AVR MCUs

(c) Ralph Doncaster 2020 open source MIT license

picoUART is a pico-size simplex high-speed AVR bit-bang UART. Code size is less than 80 bytes total for transmit and receive. picoUART timing is accurate to the cycle (+- 0.5 cycle error); this is less than 1% at 8Mhz.

picoUART is a library that is compatible with the Arduino API but is not dependent on any Arduino functions so it can be used with avr-libc, and sample makefiles can be found for the examples. When used with the Arduino IDE, version 1.6.0 or later is required.

Default Rx is on PB1, and Tx is on PB0. If set to the same pin in pu_config.h, picoUART is also capable of 1-wire (shared Rx/Tx) operation.

picoUART 1.0.0 supports interrupt-driven receive using pin-change interrupts on the t13 and t85 series. Currently 1-wire shared Rx/Tx is not supported with PCINT-based receive. Full-duplex communication is not possible, so received characters will be lost if they arrive during transmit. For the interrupt driven receive, use purx_dataready() and pu_read(). Due to ISR overhead, the maximum reliable speed is 115.2kbps at 8Mhz. There is a single-character receive buffer, so data is likely to be lost if it is not read and processed quickly. A 16-byte receive FIFO is a possibility for a later version.

Examples include a clock tuner program to help determine the best OSCCAL value for error-free communication.

For an even smaller transmit-only asynchronous serial library, see debugSerial.

For a full-duplex bit-banged AVR UART implementation, see WGMUART.

picouart's People

Contributors

nerdralph avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.