I have a problem on writing a code to send the data through USB to my computer. I plan to send 4 bits at one time. Do I need to convert the data?
Can I know the form of data to transmit through USB? Is string or integer or in character?
I am using C language in CCS software and PIC18F2550.
Anyone have the code or relevant info? Can send to me. Thanks.
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Wed Oct 20, 2010 1:31 pm
The smallest unit is a byte. So, just put your 4 bits into the lower 4 bits
of a byte. Make the upper 4 bits be 0. Then send the byte.
Example:
0000xxxx
Your data is in the lower 4 bits of a byte , shown as "xxxx" above.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum