EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / the problem is sending and

the problem is sending and

|

Microcontroller › AVR › Error using Lm35 Interface with Atmega 16 › the problem is sending and

February 4, 2014 at 5:53 pm #10936
Ashutosh Bhatt
Participant

the problem is sending and printing values on LCD. to display values in correct order use following function

void display(unsigned char z)
  {
  unsigned int tmp1,tmp2,t,t1,i;
unsigned char ASCII[3];
tmp1 = (z & 0x0F);
tmp2 = z>>4;
tmp2 = tmp2*16;
t = tmp1+tmp2;
if(t>=100)
 {
i=2;
while(t>10)
{
t1=t%10;
ASCII=t1+0x30;
t=t/10;
i–;
}
ASCII[0]=t+0x30;
 }
else
 {
t1=t%10;
ASCII[2]=t1+0x30;
t=t/10;
ASCII[1]=t+0x30;
ASCII[0]=0x30;
 }
writedata(ASCII[0]);
writedata(ASCII[1]);
writedata(ASCII[2]);
  }

RSS Recent Posts

  • What branch of electronics has easy spare parts sourcing in north africa ? March 6, 2026
  • USING EASYEDA BUT SOMETHING ISN'T RIGHT? March 6, 2026
  • ESP32 Sub Forum March 6, 2026
  • Hello & a Request: Recommendations for obsolete Panasonic filter Capacitors. March 6, 2026
  • Pnp transistor query March 6, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise