diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-03-15 04:02:15 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-03-15 04:02:15 +0000 |
commit | 1a130eed6c990701642afc1a1e9738dfd86b0d4b (patch) | |
tree | 30a73bb3245f7fe43d590cec4a0f3d8385fd3c61 | |
parent | 0111fb515dcda78e01b636555d39e408976888b7 (diff) | |
download | lufa-1a130eed6c990701642afc1a1e9738dfd86b0d4b.tar.gz lufa-1a130eed6c990701642afc1a1e9738dfd86b0d4b.tar.bz2 lufa-1a130eed6c990701642afc1a1e9738dfd86b0d4b.zip |
Updated the software USART code in the XPLAIN Bridge application so that the incomming bits are sampled at their mid-point instead of starting point, to give maximum reliability (thanks to Anton).
-rw-r--r-- | LUFA/ManPages/ChangeLog.txt | 2 | ||||
-rw-r--r-- | LUFA/ManPages/LUFAPoweredProjects.txt | 4 | ||||
-rw-r--r-- | Projects/XPLAINBridge/Lib/SoftUART.c | 6 |
3 files changed, 9 insertions, 3 deletions
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index fbd3bdccb..231920e8f 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -68,6 +68,8 @@ * - Changed TempDataLogger project's DS1307 driver to simplify the function interface and prevent a possible race condition * - Changed AVRISP-MKII project to use the Watchdog interrupt for command timeouts, to reduce CPU usage and free timer 0 * for other uses + * - Updated the software USART code in the XPLAIN Bridge application so that the incomming bits are sampled at their mid-point + * instead of starting point, to give maximum reliability (thanks to Anton) * * <b>Fixed:</b> * - Core: diff --git a/LUFA/ManPages/LUFAPoweredProjects.txt b/LUFA/ManPages/LUFAPoweredProjects.txt index fd2a76819..34d4944b6 100644 --- a/LUFA/ManPages/LUFAPoweredProjects.txt +++ b/LUFA/ManPages/LUFAPoweredProjects.txt @@ -46,14 +46,16 @@ * - DIY PS3 controller emulator: https://code.google.com/p/diyps3controller/ * - EMUCOMBOX, a USB-RS422 adapter for E-Mu Emax samplers: http://users.skynet.be/emxp/EMUCOMBOX.htm * - Estick JTAG, an ARM JTAG debugger: http://code.google.com/p/estick-jtag/ - * - "Fingerlicking Wingdinger" (WARNING: Bad Language if no Javascript), a MIDI controller: http://noisybox.net/electronics/wingdinger/ + * - "Fingerlicking Wingdinger" (WARNING: Bad language if no Javascript), a MIDI controller: http://noisybox.net/electronics/wingdinger/ * - Flyatar, a real-time fly tracking system: https://github.com/peterpolidoro/Flyatar * - Garmin GPS USB to NMEA standard serial sentence translator: http://github.com/nall/garmin-transmogrifier/tree/master * - Generic HID Device Creator: http://generichid.sourceforge.net/ * - Ghetto Drum, a MIDI drum controller: http://noisybox.net/art/gdrum/ * - IR Remote to Keyboard decoder: http://netzhansa.blogspot.com/2010/04/our-living-room-hi-fi-setup-needs-mp3.html * - LED Panel controller: http://projects.peterpolidoro.net/caltech/panelscontroller/panelscontroller.htm + * - LUFA powered DDR dance mat (French): http://logicien-parfait.fr/dokuwiki/doku.php?id=projet:ddr_repair * - Motherboard BIOS flasher: http://www.coreboot.org/InSystemFlasher + * - Multi-button Joystick (French): http://logicien-parfait.fr/dokuwiki/doku.php?id=projet:joystick * - Nikon wireless camera remote control (Norwegian): http://hekta.org/~hpe1119/ * - PSGroove, a Playstation 3 Homebrew dongle: http://github.com/psgroove * - Single LED Matrix Display: http://guysoft.wordpress.com/2009/10/08/bumble-b/ diff --git a/Projects/XPLAINBridge/Lib/SoftUART.c b/Projects/XPLAINBridge/Lib/SoftUART.c index ddd983a91..370e806ac 100644 --- a/Projects/XPLAINBridge/Lib/SoftUART.c +++ b/Projects/XPLAINBridge/Lib/SoftUART.c @@ -81,8 +81,10 @@ ISR(INT0_vect, ISR_BLOCK) /* Reset the number of reception bits remaining counter */ RX_BitsRemaining = 8; - /* Reset the bit reception timer */ - TCNT1 = 0; + /* Reset the bit reception timer to -(1/2) of the total bit time, so that the first data bit is + * sampled mid way through the total bit time, making reception more robust. + */ + TCNT1 = -(OCR1A >> 1); /* Check to see that the pin is still low (prevents glitches from starting a frame reception) */ if (!(SRXPIN & (1 << SRX))) |