Storing and transmitting char const

Status
Not open for further replies.

hithesh123

Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Visit site
Activity points
3,548
I am designing a keyboard key emulator.
Each key on the keyboard has a hex code. I can store this in a header file as constants. For example const char A=0x1C;

When I call a function with text string as the passing parameter, I want to transmit the hex codes corresponding to the string characters.
For example, if I call the function trans_string(ABCD)

I want this function to transmit hex codes corresponding to the alphabets A, B , C and D.
 

OK. When you press A, B, C, D then you want too transmit 0x1C, 0x1D, 0x1E, 0x0F say. You can use UART to send data. trans_string() function will have a switch(key) statement. Depending upon the key pressed it will send the corresponding code for the key stored in a array.
 


I managed to accomplish that part. But I have new problem now.
The hex codes need to go out bit by bit.
I cannot use any built in functions like UART. I have bit bang.
But don't know how to send each bit of the hex data.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…