Page 1 of 1

a code practice oscillator you will actually use!

PostPosted: Thu Sep 11, 2014 11:45 pm
by N2TOH
I'm finishing up the details of a Leonardo enabled USB device that's servicing as a bridge device between a computer and a rig. I figure using it as a secondary keyboard will encourage more practice.


Can this keyer be used as a CW input keyboard for a computer?

Re: keyboard adapter

PostPosted: Fri Sep 12, 2014 12:38 am
by AE9RB
Not sure what you're asking. Do you want to type emails with your paddle or something like that?

Generic answer... if you can program an Arduino then the answer is probably yes!

Re: keyboard adapter

PostPosted: Fri Sep 12, 2014 6:54 am
by N2TOH
in a manner of speaking yes, I would like to use a paddle as an input device. It may just be the thing to encourage more people to learn and keep their practice up with daily use.

Re: keyboard adapter

PostPosted: Fri Sep 12, 2014 9:31 am
by AE9RB
You can do this with a Leonardo board. You'll have to make changes to the code but it's pretty simple...

- Call Keyboard.begin() in setup() to activate the keyboard.
- Grab the calls to lcd_write() and also send the characters to Keyboard.write().

Supporting morse characters and backspace should be an easy 5 lines of custom code. From there it can get complicated when you need to support things like arrow keys, shift key, control key, etc. since there's no morse codes for those.

Re: keyboard adapter

PostPosted: Wed Oct 29, 2014 10:46 pm
by N2TOH
I still working my way thru this code in an effort to better understand what changed I need to make, in an effort to use charters from the 8 bit ASCII tables.

in an effort to understand how these defines govern the program I've searched google and read the books I have on the arduino, and should look in my K&R C book again.

this seems to be the current sticking point, I've managed as many as 6 inputs for a given character but seem to be having issue with the first 20 non-printable ACSII codes. adding them in to gain the line feed and carage return has caused the table to become offset.

#define MCODE_L(x) (((x&0x0000000FUL)?1:0)\
+((x&0x000000F0UL)?1:0)\
+((x&0x00000F00UL)?1:0)\
+((x&0x0000F000UL)?1:0)\
+((x&0x000F0000UL)?1:0)\
+((x&0x00F00000UL)?1:0)\
+((x&0x0F000000UL)?1:0))
#define MCODE_C(x) (((x&0x00000002UL)?128:0)\
+((x&0x00000020UL)?64:0)\
+((x&0x00000200UL)?32:0)\
+((x&0x00002000UL)?16:0)\
+((x&0x00020000UL)?8:0)\
+((x&0x00200000UL)?4:0)\
+((x&0x02000000UL)?2:0))
#define MCODE(d)((uint8_t) (d==0||d==0x80)?d:MCODE_C(0x##d##U)\
+(1<<(7-MCODE_L(0x##d##U))))

Re: a code practice oscillator you will actually use!

PostPosted: Sun Mar 08, 2015 4:26 am
by N2TOH
how long a string of inputs can be used for a PROSIGN? I'd like more then 7