Microcontroller › 8051 › how to display a 4-digit numeric data on 7-seg displays with variable data at receiver › ofcourse data received is
ofcourse data received is from LSB.
Herein,first of all i hav to communicate with dial guage through rs-232. the reading on dial guage is received at Rxd which is supposed to be stored at sbuf. As received data is ASCII.first convert it to HEx by anding with 0x7Fh & comparing fo carriage return i.e CJNE 0x0D& store it at some memoy location.
later division is to be carried out so as to separate each digit by dividing d 4-digit data with 1000,100,10 respectivly.after evry DIV opration data in A is sent to disp being selcted by transistor selection & the remainder stored in B is carried to next DIV instruction by sending it to Acc.
i hav also stoed a look-up table at dptr with 0-9 hex values.
n virtual terminal connected is supposed to be dial guage just to carry out simulation