Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | Re: need some help with bx-24

Discussion forum for the BasicX family of microcontroller chips.

Re: need some help with bx-24 - Tom Becker - Dec 5 17:19:13 2007

> .. I'm trying to connect a LED to each programmable pin of the chip...

An LED normally needs a current-limiting resistor in series to prevent
destroying it - or the circuit trying to drive it. Usually, LEDs
operate with 20mA or less. If you connect an LED from +5V (BX-24 pin
21) to an output pin, like pin right next to it (through a 1k resistor,
a safe value, but it can be as low as ~200ohms or so), you should see
the LED illuminate when the pin is low, and not illuminate if the pin is
high. Alternatively, although it is not the generally-preferred method,
you can connect the LED between an output and ground (pin 23 or pin 4)
through the resistor; the LED should then illuminate when the pin is high.

Your program also has an error in it. Since you are using
register.PORTn to control the pins, you also need to set the direction
registers, register.DDRn, which initialize to inputs.

What voltage was on pin 24 when you connected the LED between it and an
output pin? It is possible to damage the processor with that connection.
Tom



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: need some help with bx-24 - eyal munteanu - Dec 7 0:12:52 2007

hi man thanks a lot for your answer i really appreciate it.
I'm really quite ignorant at electronics but i makeup for it with stubbornness i guess :) I'm more into doing circus and modern dance (i add some links to videos of what i do just if you interested) and i want to make a programmable light staff to build a show around.
any why the seller gave me 200hms resistor, that might be the problem. I'll check it out.

thanks
eyal

http://www.youtube.com/watch?v=A5D7Os-HGpQ
http://www.youtube.com/watch?v=erKSpntkw-k
http://www.youtube.com/watch?v=e11hUsPCBvs

Tom Becker wrote:
> .. I'm trying to connect a LED to each programmable pin of the chip...

An LED normally needs a current-limiting resistor in series to prevent
destroying it - or the circuit trying to drive it. Usually, LEDs
operate with 20mA or less. If you connect an LED from +5V (BX-24 pin
21) to an output pin, like pin right next to it (through a 1k resistor,
a safe value, but it can be as low as ~200ohms or so), you should see
the LED illuminate when the pin is low, and not illuminate if the pin is
high. Alternatively, although it is not the generally-preferred method,
you can connect the LED between an output and ground (pin 23 or pin 4)
through the resistor; the LED should then illuminate when the pin is high.

Your program also has an error in it. Since you are using
register.PORTn to control the pins, you also need to set the direction
registers, register.DDRn, which initialize to inputs.

What voltage was on pin 24 when you connected the LED between it and an
output pin? It is possible to damage the processor with that connection.

Tom

---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.

[Non-text portions of this message have been removed]



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: need some help with bx-24 - Tom Becker - Dec 7 22:26:28 2007

> ... 20 0hms resistor...

Yes, that's too small for a typical LED limiting resistor.
Tom



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )