Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Looking for simple CW encoder and decoder projects

Status
Not open for further replies.
Hi,

ATmega328 may be programmed (coded) in assembly, too. Or C or some Basic ... you are free to use the language you want.
It may be programmed (flashed) with or without bootloader. It may be flashed in a programmer or in circuit.

Klaus
 

There are two ways to program them:

1. with an electronic gadget that sends the signals directly to the pins in the correct sequence and 'burns' the code in to the silicon, I think this is what you already have.

2. with a bootloader. This is a small program entered with 1. above but from then on lets you program using a serial link and it stays in the device to allow you to re-program or erase it afterwards. Its basically a block of code that initializes the serial port and accepts data in a special format that lets it decide whether what it receives is an address to store a value into or the data to be put there.

The drawback to 1. is you need the extra hardware.
The drawback to 2. is you have to reserve some memory to hold the bootloader so less is available to your program and you need a method to tell it whether to run 'normally' or execute the bootloader. You still need to use 1. to install the bootloader code before it can be used of course. It is possible to corrupt the bootloader in which case you have to go back to step 1.

Note that in most cases the bootloader has nothing to do with USB, it has to be interfaced using another device that converts the PC's USB port to plain ordinary serial TX and RX lines.

With the nodeMCU I mentioned earlier, I use a WiFi bootloader so I don't even need a USB cable, I update programs 'over the air'!

Brian.
 

Here's a circuit that works okay. Each incoming morse beep triggers a one-shot (555 timer IC). The fixed length pulse is fed to the clock input of a flip-flop. If the initial pulse (data input) is still active at the end of the reference pulse, then it records a dash.
If the initial pulse ends sooner than the reference pulse, it's a dot.

The led pattern travels left to right through the shift register.

A letter Q (dash-dash-dot-dash) was entered by clicking the logic level input at left. The scope traces show resulting pulses.

Morse beeps compared to 555 one-shot 4 D FF's create dash dash dot dash.png
 

Brads post fascinating.

Could do this single chip (LEDs and Rs off chip) as shown below.

The debouncer takes care of the key bounce problem. The sync components take
care of the asynchronous clocking into the D's so crap is not clocked into them.
A "component" in this chips lingo is an onchip resource. Note right hand window
shows resources used/left for other enhancements.....

Basic design is codeless.

The timing could easily be adapted to sender speed by adding, again internally, simple input
PW measurement so PWM could be adjusted on the fly for varying sender speed. 70 WPM is
considered fast speed for a sender, although records have been set for receive decode by a
person up to 140 WPM. Small amount of coding to do that. Novices by the way down around
5 WPM.

Would be easy to use RGB LEDs, add pwm control, to alter spectrum as speed increase.
Maybe a few lines of code to do that.

The USBUART and UART could pipe code out to PC or whatever. Again this stuff is onchip.
Coding would have to be done for this.

1613138562682.png



Regards, Dana.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top