Exact match. Not showing close matches.
PICList
Thread
'[SX] Warning: Noob content inside'
2007\02\15@120006
by
tsaavikn/a
|
|
Hey all! Not only am i a noob to the SX series, i'm a noob to micro controllers in general! be warned!
A good friend gave me a sx programmer and a bunch of sx28 chips on little cards. I have alot of info about it here: I figured since i can't use the debugger these leds would be handy for trying to diag problems in the future. I could re-use this chip for different projects and have the 11 leds for handy diags (or just fancy heartbeats atleast, lol). I then marched merrily forward with my first REAL project, a little explorer robot. I am getting some weirdness! Every time i power up the chip different LEDs light. Even 2 that should NEVER light (rc.7 and rc.6)!. i don't have ANYTHING plugged into the chip other then the bar graph, the motor controller and ir emitter/detector are not connected. i DO have a 9v battery driven 5v regulated power supply with .1uf ceramic, 10uf tantalum as close to the chip's power as i can. I'll attach the code here, i would appreciate ANY constructive comments, PLEASE don't flame me too hard, I'm a noob and need nurturing. I know the code is VERY lame, i should use functions, i should use more constants, but I'm trying to get it working before i make it pretty, don't worry, i WILL make it prettier it was hard to resist. ---------- End of Message ----------
The pinout is as follows:http://www.hellspark.com/dm/ebench/sx/images/sxpinout-dave.jpg
I hooked the positive terminals of a 11-led "bar graph" display to the entire right side (all of RC and RB5-7). I connected their negative terminals all together to a single resistor then to ground.To make sure it worked i hacked up the "pause.sxb" example program and made a little "cylon" style flasher, it worked perfectly!
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=172473
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)
2007\02\15@123915 by Sparks-R-Funn/a
|
|
tsaavik,
The problem with the LEDs on RC.6 and RC.7 is likely a result of applying the pull-up resistors to these pins. These resistors connect internally to the positive supply to try to weakly "pull up" the pin to +5V. Connecting LEDs to these pins exposes them to +5V as well. Apparently this is enough to cause them to light.
I did not look further for other problems.
- Sparks
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=172473#m172489
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)
2007\02\15@132125 by tsaavikn/a
|
|
Doh!! Thank you Sparks. Whats the best way of leaving those unused (but connected to leds) pins? Mark them as outputs and just not use them? Or should i set them to 0 for safety? I remember reading about some golden rule of always making unused IO pins inputs that are pulled up by resistors, but i guess my definition of unused needed refinement. Note to self, led present but ignored != unused :D
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=172473#m172494
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)
More... (looser matching)
- Last day of these posts
- In 2007
, 2008 only
- Today
- New search...