Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Microcontroller Pin with switch problem...

Status
Not open for further replies.

Js_Ong

Member level 4
Joined
Jan 15, 2007
Messages
68
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
1,796
Hi All,

I had done a programme with as below, all Port 1 haspull down 10K and individual switch.

JNB P1.7,$
START: JB P1.1, FLV_1
JMP Start

The programme works as expected, but the problem is, when I continuously press button at P1.1, the programme still run, seems like overwriting the P1.7 switch? Please help why this happenned?

Thanks.
 

Hi Screepss,

I had tried to make a delay for 2.4ms, the result are same. And I tried to change my switch circuit using 74HCT541 Buffer instead of 10 pull down resistor, but the result become worse. The 8051 is giving output once reset and no button was pressed, there was nothing happened when I pressed the buton. And this is really bordered me.
 

Don't get board.. Let me tell you one thing, the delay u used is very low, because a mechanical action will take at least 20ms to execute. Can you please post your schematic here so that we can get more clear picture
 

You are trying to code in assembly i see..!! that's good..
but if you are not getting what's wrong..!!
try coding in C and then generate assembly from your C code.
see if the code from C works..try simulating first..!!
if every thing is cool try making changes in assembly cos there is always scope to improve your code in assembly..!!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top