pranitamm
Member • Nov 2, 2008
hex to bcd?
in my project i require bcd at port 0 and 3 of microcontroller 89s52 since there are three 7447 connected
(i.e p0.0-p0.3 to 7447(1) lsb,
p0.4-p0.7 to7447(1),
p3.0-p3.3 to7447(3)msb)
which drive three 7 segment displays
now suppose i want to display (240)d then in the accumulator there is its hex equivalent i.e (F0)h which is proper but now when i convert it to bcd using the instruction DA A i get 50 in the accumulator with a carry.now this is the problem instead of having 240 at the o/p there comes 150
please can anybody help me to splve this problem??????
please its very urgent!!!!!!
(i.e p0.0-p0.3 to 7447(1) lsb,
p0.4-p0.7 to7447(1),
p3.0-p3.3 to7447(3)msb)
which drive three 7 segment displays
now suppose i want to display (240)d then in the accumulator there is its hex equivalent i.e (F0)h which is proper but now when i convert it to bcd using the instruction DA A i get 50 in the accumulator with a carry.now this is the problem instead of having 240 at the o/p there comes 150
please can anybody help me to splve this problem??????
please its very urgent!!!!!!