Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 25th May 2008, 02:58 AM   (permalink)
Default

Quote:
Originally Posted by c36041254 View Post
Thank you ! futz turning off the WPUs work !, why they were causing the problem ?
You can't have pullup and pulldown on the same switch. I'm not positive that was the whole problem anyway. A switch that is pulled down to ground with a resistor is expected to go high when pressed. If it is pulled up to VDD it is expected to go low when pressed. Your code expected the switches to have pulldowns and go high when pressed. Adding pullups into that is just confusing. You probably ended up with a halfway voltage that might or might not trigger the interrupt, sometimes. It was probably effectively floating. A floating pin can do random things.

There were a couple things in your code that may have been causing trouble too. I forgot to make notes while I was going thru it, so I don't know the details. You can compare and see for yourself.

Quote:
I have just finished my diploma in electronics and telecommunication (Bachlor's running) so, I was wondering that at this stage, is it normal to have this much knowledge (whatever you can make out of this discussion ), I am very nervous about all this, it was just a very simple programme and still took so long for me ! and there was Mike who explained me what was 104pF (104pF = 0.1uF), after having a diploma I'm making an impression that I even don't know how to read 104pF, I'm sure Mike was just helping me but, all these makes me really nervous, Does this usually happens or I'm a dumb electronics hobbiest and need to study hard ?, though in my class I am the smartest one (trust me my teachers say so ) (don't be polite in responding)
What? You're supposed to know more than me! I'm just a hobbiest tinkerer. Never been to school for any of this stuff. Sometimes I wonder about what they're teaching in those schools...

Anyway, the only way to learn how to program well is to write programs! LOTS of them. Practice, practice, practice until it becomes "easy".
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 25th May 2008 at 03:10 AM.
futz is offline   Reply With Quote
Old 25th May 2008, 03:16 AM   (permalink)
Default

HA HA ! that was pull up not pull down How couldn't I see that ?!!!!!!!
__________________
CHRIS
c36041254 is online now   Reply With Quote
Old 25th May 2008, 03:19 AM   (permalink)
Default

Quote:
Originally Posted by c36041254 View Post
HA HA ! that was pull up not pull down How couldn't I see that ?!!!!!!!
Hehehe. It happens!

I just tried your original code with the weak pullups disabled and it works fine. That was the whole problem. My code cleanup just made some things better and clearer to read.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline   Reply With Quote
Old 25th May 2008, 03:30 AM   (permalink)
Default

This is why it is better to use the internal pullups (where available) with the switches pulling the pin low. Your pull downs must have been 20K or higher as the internal ones are (nominally) 20K.

Don't worry too much about your lack of abilities. As Futz said, you just need practice.

Mike.
Pommie is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
weird garage door problem lukasz General Electronics Chat 33 26th January 2007 08:50 PM
Weird 74LS90 counter problem Torben Electronic Projects Design/Ideas/Reviews 11 8th December 2006 09:07 AM
Weird DVD Problem ThermalRunaway General Electronics Chat 15 17th August 2005 06:32 PM
weird pic code problem Fletcher Micro Controllers 9 13th October 2004 02:39 PM
wierd problem with 16f628 eeanma Micro Controllers 2 1st November 2003 11:42 AM



All times are GMT. The time now is 08:57 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.