Shop OBEX P1 Docs P2 Docs Learn Events
Am I crazy? SHIFTIN problem... — Parallax Forums

Am I crazy? SHIFTIN problem...

SteelSteel Posts: 313
edited 2007-02-24 04:11 in General Discussion
Wierd.· For some reason, I am not able to get the correct variable value for my shiftin.· I feel silly with this issue..

When I scope the clock and data lines, they show correct information.

When I debug out my data, it shows "FF", even though it shouldn't.

Has anybody come across this?

Here are the important parts of my code:

'PINS:
·ALARM_DATA··VAR·RB.3
·ALARM_SH_LD··VAR·RB.4
·ALARM_CLK··VAR·RB.5

'Variables:
ALARM_BLOCK ·VAR BYTE


'Start Code:
LOW ALARM_SH_LD


'Shift

·HIGH ALARM_SH_LD
··SHIFTIN ALARM_DATA, ALARM_CLK, MSBFIRST, ALARM_BLOCK
··LOW ALARM_SH_LD


...at this point, All of the data is visible at the correct pins on the SX Chip.


When I debug it out to my PC:

SEROUT XBEE_DIN, T115200, ALARM_BLOCK

I recieve "FF".· The baud is set correctly, and I am using a 50MHz crystal.

Has anybody else come across this?· any help would be appreciated.

Shaun

Comments

  • BeanBean Posts: 8,129
    edited 2007-02-23 20:48
    Shaun,
    For SHIFTIN use MSBPRE, MSBPOST, LSBPRE, OR LSBPOST
    See if one of those options works.

    Bean.

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

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    ·
  • SteelSteel Posts: 313
    edited 2007-02-23 21:14
    Unfortunately, none of them work.

    The interesting thing is that the dataline is never high before or after the shift. I don't know what it would be recieving ANY High signals from...

    This is odd...
  • JonnyMacJonnyMac Posts: 9,283
    edited 2007-02-24 04:11
    It would be helpful to know what device you're trying to use. Another thing is that you need to preset the level of the clock line prior to using SHIFTIN or SHIFTOUT; that line is simply toggled through the routine -- this lets you use rising- or falling-edge clock inputs.
Sign In or Register to comment.