Shop OBEX P1 Docs P2 Docs Learn Events
No output power? — Parallax Forums

No output power?

DigitalManDigitalMan Posts: 42
edited 2006-07-13 19:33 in General Discussion
Yes yes, I know you're sick of me.

I'm trying to work with a 7-digit (6 are hooked up) 7-segment display. To test out the display, I essentially adapted the code on the first page of the SX/B·help file.

The segment anodes are hooked up to the lower 7·pins of Port C. The lower 6 pins of Port B are connected to the base of PN2222A transistors, which are then hooked to the digit cathodes. The SX chip allegedly programs fine, has been tested with various options and resonators, but doesn't do what it's been programmed for. Connecting power directly at various places confirms that the wiring is right, and dropping LED's in a few places confirms that there is no power coming from any of the pins.

According to SXSim, it should actually work... after a very, very long startup time, which I do not know the actual time of. Could be a fraction of a second, but it takes too long to step through.


Device·SX28, OSCXT2, TURBO, STACKX, OPTIONX
IRC_CAL·IRC_4MHZ
FREQ·4_000_000

Segs·VAR·RC
counter·VAR·byte

WATCH·Segs, 1, UBIN

PROGRAM Start

Start:
·RB = $FF
·TRIS_C = %00000000
·TRIS_B = %00000000

Main:
·FOR counter = 0 TO 255
··Segs = counter
··PAUSE 10
·NEXT
·GOTO Main

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I think I shall assemble a circuit to run various·calculations, and control peripherals accordingly. I will give it some user input device, and perhaps a display screen to show data. But what would I call this device...

Comments

  • BeanBean Posts: 8,129
    edited 2006-07-12 02:52
    Not sure what the problem is, but if you use "PROGRAM Start NOSTARTUP" you won't have to step through all the startup code. But all variables will NOT be set to zero.
    It doesn't look like that would affect the program you posted.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "I'm a man, but I can change, if I have to, I guess" The Red Green Show
    ·
  • DigitalManDigitalMan Posts: 42
    edited 2006-07-12 03:32
    Thanks, that does help the debug process. It is confirmed that my code will indeed set the pins to outputs and set certain·outputs high according to SXSim. The problem seems to be... the chip isn't being programmed. The compiler says it is, no claims of error, but when·I go to read I get nothing. I think I'll try with another chip...

    Edit: "Verify failed at oscillator" sounds like a bad thing. Is it a bad thing?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I think I shall assemble a circuit to run various·calculations, and control peripherals accordingly. I will give it some user input device, and perhaps a display screen to show data. But what would I call this device...

    Post Edited (DigitalMan) : 7/12/2006 3:37:54 AM GMT
  • LightfootLightfoot Posts: 228
    edited 2006-07-12 05:22
    Think your chip is fried too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Well well, I'm seeing things, three of them.

    -Stanley Blystone
  • DigitalManDigitalMan Posts: 42
    edited 2006-07-12 10:00
    Alright, after going through most of my chips, I discovered that the problem was just in·the code. The "IRC_CAL" was causing it to calibrate the internal·oscillator... and nothing else. With that line removed, the program runs exactly as it should, and can even debug.

    And conveniently, the time spent pondering over what was going wrong was also used to create the much more complex·countdown program I needed, which also works.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I think I shall assemble a circuit to run various·calculations, and control peripherals accordingly. I will give it some user input device, and perhaps a display screen to show data. But what would I call this device...
  • BeanBean Posts: 8,129
    edited 2006-07-12 12:52
    Ahh,
    To use the internal oscillator you need to change "OSCXT2" to "OSC4MHZ" in your device line.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "I'm a man, but I can change, if I have to, I guess" The Red Green Show
    ·
  • DigitalManDigitalMan Posts: 42
    edited 2006-07-13 05:36
    Would I still be able to debug if it were set to use the internal oscillator? And·do I have to calibrate it further, or will the 10+ times I've done it previously suffice?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I think I shall assemble a circuit to run various·calculations, and control peripherals accordingly. I will give it some user input device, and perhaps a display screen to show data. But what would I call this device...
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-07-13 19:33
    DM,

    ·· I have a question about your circuit...You said you connected the output ports to the bases of transistors, but you didn't say through resistors.· Without a resistor you would most likely draw excessive current from the I/O pins.· Just checking.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.