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.

sending integer value in form of unsigned char to atmega16

Status
Not open for further replies.

shashankshanky

Newbie level 3
Newbie level 3
Joined
Apr 14, 2013
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,312
hi i am currently doing a project on atmega16.
i want to send the values from the PC that determines whether the pin should be set or reset.
i.e if i want all port a pins to be set then i should send the value 255, if i want only the PA0 to PA2 to be set, i should send the value 7, however since only unsigned char is poss. how can i achieve this
 

whats your actual problem?
interfacing it to pc?
or sending data?
or setting pins by sending unsigned char..

NOTE: you can not set individual pins in AVR, as they can not be bit manipulated, you have to send char (8bits ) to set the pins...
 

i dont know how to send the data(value from 0-255) in the form of unsigned char.
i know how to send the regular characters from PC (alphanumeric single digit) via the hyperterminal. but not the data ranging from 0-255 .
 

This is implementation of serial communication, you may also need something like Max232 for this purpose. Using serial communication you can manipulate as many bits as you wish applying necessary logic.
 

In place of Hyperterminal, better use realterm or similar software like terminal.
It is matter of selecting data format in the terminal.
I dont see any problem. If you find a difficulty, please post it clearly.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top