Shop OBEX P1 Docs P2 Docs Learn Events
A little help please — Parallax Forums

A little help please

PliersPliers Posts: 280
edited 2013-10-23 16:59 in Propeller 1
I have been away too long and have forgotten the basics.
I thought this would run.
I'm using a QuickStart board. I know the board is OK.
I thought a few LEDs would have lit up.
PUB ex01 
cognew(@ex01A, 0) 
 
DAT 
ORG 0 
ex01A 
MOV DIRA, #$FF ' Output to I/O 0 to 7 


loop
MOV OUTA, #$AA
JMP #loop ' repeat loop 


FIT 496

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2013-10-23 10:05
    Pliers wrote: »
    I have been away too long and have forgotten the basics.
    I thought this would run.
    I'm using a QuickStart board. I know the board is OK.
    I thought a few LEDs would have lite up.
    PUB ex01 
    cognew(@ex01A, 0) 
     
    DAT 
    ORG 0 
    ex01A 
    MOV DIRA, #$FF ' Output to I/O 0 to 7 
    
    
    loop
    MOV OUTA, #$AA
    JMP #loop ' repeat loop 
    
    
    FIT 496
    
    The QuickStart LEDs are on pins 16-23.
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-10-23 10:27
    MOV DIRA, my_LED

    loop
    MOV OUTA, my_AA
    JMP #loop ' repeat loop

    my_LED long $00FF0000
    my_AA long $00AA0000
  • PliersPliers Posts: 280
    edited 2013-10-23 10:27
    Thanks David.
    The data sheet lead my astray, but the board LEDs are labeled P16-P23.
    Here is the text copied from the data sheet I was using.
    LEDs
    D1 through D8 indicate the status of P0 through P7, respectively. The LEDs are driven through a buffer, so they do not load the I/O pins. If the P0 through P7 are left floating, the LEDs may light when the respective I/O pin floats high. To ensure that they stay off when the I/O pin is not in use, drive the I/O pin low.
    Resistive Touch Buttons
    P0 through P7 are connected to resistive touch buttons. Each button is a pad, surrounded by ground pads, connected through a 100 K ohm ESD protection resistor, to the I/O pin. When the buttons are not in use, they will not load the I/O pins. When touched, they will add negligible resistive loading. To read the state of the button, set the I/O pin as a high output, then immediately switch it to an input, then measure the amount of time before the I/O pin falls low. If nothing is touching the pad, the parasitic capacitance of the I/O pin and the PCB will hold the input high for several milliseconds. Alternately, instead of measuring the fall time, measure the input state I millisecond after the pin was switched to an input. See the “Touch Buttons LED Demo” from the QuickStart page at http://www.parallaxsemiconductor.com/products/quickstart.
  • PliersPliers Posts: 280
    edited 2013-10-23 10:29
    Thanks Tony for the indirect addressing reminder.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-10-23 10:32
    Pliers wrote: »
    Thanks David.
    The data sheet lead my astray, but the board LEDs are labeled P16-P23.
    Here is the text copied from the data sheet I was using.
    Maybe they're talking about some default program that comes pre-programmed into the EEPROM? You press one of the touch buttons and the corresponding LED lights maybe?
  • PliersPliers Posts: 280
    edited 2013-10-23 10:38
    It does say.
    D1 through D8 indicate the status of P0 through P7.
    No big deal.
    Thanks again.
    My LEDs are Lit!
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-10-23 11:03
    Pliers wrote: »
    It does say.
    D1 through D8 indicate the status of P0 through P7.
    And they do. P0 through P7 are the touch pads. The output of the LEDs correspond to the state of the touchpads.

    Have you seen this thread?

    There are lots of links to QuickStart demos and project in it.

    Plier, this thread has a really bad title. Think of it, just about half the threads in the forum would have the same title if everyone used "help please". I suppose there might be a few "help or else" but it still wouldn't be very meaningful. How about "Question about PASM I/O pin control"?

    Now I need to go back thru the thread to look for misspelled words (a nitpickers work is never done).
  • PliersPliers Posts: 280
    edited 2013-10-23 15:59
    Hey Duane.
    P0 through P7 are the touch pads. The output of the LEDs correspond to the state of the touchpads.
    Is only true is you write a program to sense the input at P0-P7 and then output to P16-P23
    If you look at the schematic, you will see that the LEDs are connected to P16 thru P23 via a 74HC51.

    Pins.png
    1019 x 625 - 68K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-10-23 16:59
    Pliers wrote: »
    Hey Duane.

    Is only true is you write a program to sense the input at P0-P7 and then output to P16-P23
    If you look at the schematic, you will see that the LEDs are connected to P16 thru P23 via a 74HC51.

    Yes, you are righty. I followed the earlier link you gave to see the quote in context and there isn't any mention about using a touchpad program. They are using P0 - P7 instead of P16 - P23 just like you said. IMO, the documentation is misleading and should be fixed.

    Thanks for taking the time to clarify (I should have been more careful about reading the document).
Sign In or Register to comment.