Shop OBEX P1 Docs P2 Docs Learn Events
LED example in "What is a microcontroller" problems — Parallax Forums

LED example in "What is a microcontroller" problems

TiladeTilade Posts: 5
edited 2008-12-14 01:09 in Learn with BlocklyProp
Here's my problem.· It looks like that somehow pin 15 on my basic stamp does not function properly.· Is there a method that allows the OUTH and DIRH commands without using pins 8-15 and instead use 7-14 for example?

Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-13 23:36
    Pin 7 is part of one of the named halves of the I/O register, OUTL / DIRL. OUTH / DIRH is the other half. The whole 16 bit I/O register is named OUTS / DIRS. There are ways to shift data so you could use pins 7-14 for a byte value. The first question is "is pin 15 really broken?". If it is really and truely burnt out, use the attachment manager to include your program in your reply. Also include, if possible, a sketch of your circuit.
  • TiladeTilade Posts: 5
    edited 2008-12-13 23:58
    I'll attach a diagram in a moment, but it is page 173 of the "what is a microcontroller" manual. Instead of using pins 8-15, could I use OUTL and DIRL and move my wiring to use pins 1-7 instead?

    I've done a simple code that turns pin15 high and plug in an led, and it does not light. Same went with a buzzer I attached (and it was a simple circuit with the gound attached)...so i'm fairly confident it's burnt out.
  • TiladeTilade Posts: 5
    edited 2008-12-13 23:59
    Sorry, I meant pins 0-7 instead
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-14 01:09
    Yes, you could use OUTL / DIRL instead of OUTH / DIRH to use pins 0-7 instead of pins 8-15.
Sign In or Register to comment.