Simple Bell 202 implementation
Posted: Tue Jun 21, 2022 7:59 am
So.. Things are going great for my new project of recording data to reels of tape, using something close to the Kansas City Standard. 1200/2400Hz, 4/8 pulses pr bit = 300 baud, with a leader byte of 7F.
Reception/loading I'm achieving by simply running the audio through a comparator and triggering a CA1 IRQ and using T1 to count the time between IRQs. It works! Yay! I'll throw together a video with the details "soon".
While I was at it I thought this was close enough to APRS / Bell 202 to use the same idea, however this uses 1200/2200Hz instead, meaning the 2200Hz pulses don't fit with the bitrate. For instance the unencoded byte $FE (LSB first) will consist of one long pulse and only 13 short pulses instead of the 14 it would've been for an even fit. Also APRS allows changing the frequency at offset phases - meaning the frequency doesn't just change at the zero crossing and sometimes messing up the counting because it edges on zero crossings.
Since data is NRZI encoded I shouldn't really run into 7 "1"'s in a row but it does happen when receiving flag bytes.
Right now I'm just trying to add the 14th pulse in software and see if that'll work well enough to receive a "perfect" APRS packet... I know it's far from optimal but getting it to work with just a single IC is part of the fun.
The 6522 datasheet recommends using T1 for timing async serial data but sampling a frequency is a different matter than sampling a level... I can't really wrap my head around checking the frequency without timing zero crossings. Maybe a 4046?
Any other suggestions for receiving Bell 202 either in software or hardware (assuming comparator + 6522 already available)?
Reception/loading I'm achieving by simply running the audio through a comparator and triggering a CA1 IRQ and using T1 to count the time between IRQs. It works! Yay! I'll throw together a video with the details "soon".
While I was at it I thought this was close enough to APRS / Bell 202 to use the same idea, however this uses 1200/2200Hz instead, meaning the 2200Hz pulses don't fit with the bitrate. For instance the unencoded byte $FE (LSB first) will consist of one long pulse and only 13 short pulses instead of the 14 it would've been for an even fit. Also APRS allows changing the frequency at offset phases - meaning the frequency doesn't just change at the zero crossing and sometimes messing up the counting because it edges on zero crossings.
Since data is NRZI encoded I shouldn't really run into 7 "1"'s in a row but it does happen when receiving flag bytes.
Right now I'm just trying to add the 14th pulse in software and see if that'll work well enough to receive a "perfect" APRS packet... I know it's far from optimal but getting it to work with just a single IC is part of the fun.
The 6522 datasheet recommends using T1 for timing async serial data but sampling a frequency is a different matter than sampling a level... I can't really wrap my head around checking the frequency without timing zero crossings. Maybe a 4046?
Any other suggestions for receiving Bell 202 either in software or hardware (assuming comparator + 6522 already available)?