C Program to Interface Keypad Using 8051
I wanna make a program in c which will scan the keypad and send the result to first serial port.
P1.0 to P1.3 stands for columns and P2.0 to P2.3 stands for rows. Serial port should have a band 56k, 8 bit and 1 stop bit.
Help me do + understand it.. Thanx
A beginner is here..
lcd and 8051 in proteus??
how do i simulate lcd and 8051 to display simply "Hello World!" in Proteus 6 by assembler. plz upload the design file (DSN) and assembler (asm) for that purpost.
thank you
proteus simulation: serial communication using two 8051
hi i am trying to do a proteus simulation of serial communication of two microcontrollers as shown in the attachment but unable to do it..as the optocoupler connected to it does not work and there is no sign of signal in the TxD pin and the led glows automatically in simulation.
the logic i want to do is i want to send a letter say 'D' serially from microcontroller 1 and if i receive the same in the microcontroller 2 i want the led to glow.
the coding i used is
micro 1:
org 0000h
mov a,#00h
mov p1,a
mov p3,a
halt:
jb p1.0,abb
sjmp halt
abb:
mov TMOD,#20h
mov TH1,#-3
mov SCON,#50h
setb TR1
mov SBUF,#'D'
here: jnb TI,here
ret
micro2:
org 0000h
mov a,00h
mov p1,a
mov p3,a
mov TMOD,#20h
mov TH1,#-3
mov SCON,#50h
setb TR1
clr RI
rpt:jnb RI,rpt
mov a,SBUF
cjne a,44h,next
next:setb p3.1
end
could not find where wrong ???
Led not blinking using 8051!
Hey guys!
I setup a breadboard circuit to do the basic single led blinking test using a AT89C52 chip. However, I do not get any blinking, it just lights up until power is stopped. I had only enabled a single bit for port0.0. The code is below. However, the led lights up even if I connect it to any other port. Is it a problem with my code? Please check it. Thank You.
[code]#include<reg52.h>
sbit led = P0^0;
void delay(int time) //This function produces a delay in msec.
{
int i,j;
for(i=0;i<time;i++)
for(j=0;j<1275;j++);
}
void main()
{
while(1)
{
led=0;
delay(500);
led=1;
delay(500);
}
}
[/code]
measuring power factor
Hi friends,
i trying to measure power factor using 89c51 but the results are not stable. i simply started timer on first interuppt and stopped on second and then caculated, but the results aren't too good. i mean they are not too stable some times they show proper value sometimes wrong.
can anyone please share some code for the same.
Thanks
Problem with changing the sheet size in Proteus
I am using Proteus to simulate my circuits.
I want to simulate a circuit that is bigger then the normal working sheet, and when I try to change the sheet size to A3 for example the program closes.
did anybody encounter this problem?
thanks...