Forum Replies Created
-
AuthorPosts
-
HallBrooksParticipant
I still don’t understand my problem.
the same code is working with a developpement board (8051) but not working in a breadboard or a pcb.
it’s working very in Proteus too.
I want my small project of robot line follower, hte code is working fine in proteus and the developpement board, i can’t use a big developpement board in my tiny robot.
HallBrooksParticipantYes for 1000ms delay, the Led glow for a 0.5s and then stay off always.
I tried 500ms delay, the Led stay high always.
please have a look with this design, i reproduced this in a bread board with +5V at pin (40) and ground to pin (20).
the test is always not working for me.
thank you
HallBrooksParticipantSorry if forgot the time delay but here is the code:
#include <reg52.h>
#define ON 0
#define OFF 1
sbit LED = P2^0;
void DelayMs(unsigned int msec);
void DelayMs(unsigned int msec)
{
unsigned int x,y;
for(x=0; x<=msec;x++)
{
for(y=0;y<=210;y++);
}
}
void main(void)
{
for(;
{
LED = ON;
DelayMs(100);
LED = OFF;
DelayMs(100);
}
}#
HallBrooksParticipantI use 11.0592 Mhz crystal with two 33pF
and leds are connected to thr correct ports
HallBrooksParticipantThank you for your reply.
i recognize for a beginner it’s very difficult.
So i will try to explain this project:
it can be used as door sensor monitoring.
So when the door is open 8051 must start a timer and count in seconds or ms etc…
and when the door is closed 8051 must stop the timer and in the LCD the time can be displayed.
that’s all for this moment.
i’m trying to study this….
Thank you
-
AuthorPosts