![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) | ||
|
Quote:
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:
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. |
|||
|
|
|
|
|
(permalink) |
|
HA HA ! that was pull up not pull down
__________________
CHRIS |
|
|
|
|
|
|
(permalink) | |
|
Quote:
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 ========================= |
||
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| 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 |