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 | binary out to pins

Discussion forum for the BasicX family of microcontroller chips.

binary out to pins - mechatronicsccc - Jul 5 23:36:07 2007

I know in the basic stamp I could output a number out to 8 outputs and
these outputs are connected to LEDs and it would give it out in binary.
Can I do this with the basicX and how?


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


Re: binary out to pins - "nje...@ihug.co.nz" - Jul 6 2:11:37 2007

Yes. Read up on registers. Port A is pins 13 - 20. Port C is pins 5 - 12
For example register.ddrA = bx0111_0000 will set pin 13 low, and pins
14-16 high.
register.ddrA = bx0000_0001 will set pin 20 high.
Alternatively for example register.ddrA = 112 will set pin 13 low, and
pins 14-16 high.

neil

mechatronicsccc wrote:

> I know in the basic stamp I could output a number out to 8 outputs and
> these outputs are connected to LEDs and it would give it out in binary.
> Can I do this with the basicX and how?
>
>------------------------------------------------------------------------
>
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.5.476 / Virus Database: 269.10.0/887 - Release Date: 5/07/2007 1:55 p.m.
>
>


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

Re: binary out to pins - David Sousa Mendes - Jul 6 7:17:32 2007

Yes, sure
I have used such idea with my students.
Just use Putpin (pin number, BXoutputhigh)
Make sure you connect a 400ohm resitor in series with the LED

David
----- Original Message -----
From: mechatronicsccc
To: b...@yahoogroups.com
Sent: Friday, July 06, 2007 3:35 AM
Subject: [BasicX] binary out to pins
I know in the basic stamp I could output a number out to 8 outputs and
these outputs are connected to LEDs and it would give it out in binary.
Can I do this with the basicX and how?

[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 )