Shop OBEX P1 Docs P2 Docs Learn Events
Trying to Implement SX into my project — Parallax Forums

Trying to Implement SX into my project

StevensStevens Posts: 8
edited 2008-05-10 13:05 in General Discussion
Hello, I was wondering if anyone had any tips for me.

I have a 3x3keypad matrix on portC, LCD screen using RA0, and 3 pumps connected to RB.0,RB.1,RB.2
everything works together just fine on the SXtech programming breadboard. But when I try using the chip
without the SX programming tool nothing works.

I am using 4MHZ and no external resonator.

Comments

  • StevensStevens Posts: 8
    edited 2008-05-08 04:36
    I also have nothing connected to the MCLR and RTCC pins
  • VelocitVelocit Posts: 119
    edited 2008-05-08 05:48
    Make sure you have the device directive set to the internal 4MHz oscillator. Also, MCLR needs to be pulled high (to +5V) through a 10k ohm resistor otherwise the chip will keep resetting itself.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Paul
  • StevensStevens Posts: 8
    edited 2008-05-08 06:22
    Thanks paul. How do I word it to internal 4MHz in my code?

    Right now I have:
    DEVICE SX28, OSCXT2, TURBO, STACKX, OPTIONX
    FREQ 4_000_000
  • VelocitVelocit Posts: 119
    edited 2008-05-08 06:27
    It should be...

    DEVICE         SX28, OSC4MHZ, TURBO, STACKX, OPTIONX
    FREQ         4_000_000
    
    



    ...for the internal oscillator.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Paul
  • StevensStevens Posts: 8
    edited 2008-05-09 04:23
    Thank you for the info. But, I seem to have another problem now. Im using the #27976 LCD.
    It worked perfectly with my code before and now when I run a program on it there is only a
    single underscore line in the top right corner. I dont understand why this may have happened.
    The sample code that comes with it also doesn't work anymore. The only thing that works fine
    is the test mode.

    Does anyone have any ideas on why this may be happening?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-09 11:54
    Your serial LCD isn't working, now, because you've switched to using the internal oscillator.· The internal osc isn't accurate for "time sensitive" functions like serial data (SERIN, SEROUT), you need an accurate time-base.· So, you'll have to get a crystal or a resonator (or an external TTL/CMOS oscillator, if you can spare the current.)
  • StevensStevens Posts: 8
    edited 2008-05-09 22:07
    I see. But, now when I try to run the LCD demo. The LCD doesn't respond anymore and it used to work fine.
    I changed the freq back to the OSCXT2 given in the demo and it still doesn't work. just the underscore line
    in the top left corner. any ideas on why this may be happening?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-09 23:31
    Stevens said...
    I changed the freq back to the OSCXT2 given in the demo and it still doesn't work. just the underscore line in the top left corner.
    Does that mean that you placed a crystal or resonator?· Or·did you just go back to the SX-Key?

    If you're using the SX-Key and you've gone·back to the way it used to was and now it doesn't work, that usually means that something (probably a connection) changed.
  • StevensStevens Posts: 8
    edited 2008-05-10 00:11
    I went back to the SXKey.
  • StevensStevens Posts: 8
    edited 2008-05-10 10:04
    What exactly did you mean by the connection changing? and, is there a way to change it back?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-05-10 13:05


    ·If --
    • it was working with the SX-Key,
    • and then it didn't work when re-programmed for using the internal oscillator (SERIN/OUT won't),·
    • but, then it·didn't work when it was only (??)·re-programmed to its original "configuration",
    • then one can only figure that a connection "changed" (a wire or wires·got bumped loose and/or got mis-connected, etc.): you have an connection or inter-connection issue.

    · Check your wiring, re-check it, walk away for a good while, and then check it again.

    Post Edited (PJ Allen) : 5/10/2008 1:41:20 PM GMT
Sign In or Register to comment.