Shop OBEX P1 Docs P2 Docs Learn Events
One more time with this LTC1298 — Parallax Forums

One more time with this LTC1298

GuidoGuido Posts: 195
edited 2005-10-05 21:37 in BASIC Stamp
I have done and tried everything including changing Stamps and LTC1298. I have checked all the wiring but still no success. I think I might have something in the program that might be making this not work. I just can not get any output from this program...It does switch between chan 0 and 1.
Any help would be greatly appreciated.

Comments

  • DaveGDaveG Posts: 84
    edited 2005-10-05 17:04
    Guido,

    I have used the LTC1298 many times with the same code and have been successful.
    I think your program has two very minor problems that can be easily fixed.

    PROBLEM 1:
    **********
    Original code:
    CONFIG VAR Nib
    STARTB VAR Bit 'CONFIG.BIT0
    SIGIDIF VAR Bit 'CONFIG.BIT1
    ODDSIGN VAR Bit 'CONFIG.BIT2
    MSBF VAR Bit 'CONFIG.BIT3

    Fixed code:
    CONFIG VAR Nib
    STARTB VAR CONFIG.BIT0
    SIGIDIF VAR CONFIG.BIT1
    ODDSIGN VAR CONFIG.BIT2
    MSBF VAR CONFIG.BIT3

    The CONFIG.BIT0 modifier designates STARTB as an alias for Bit 0 of the CONFIG variable, etc.


    PROBLEM 2:
    ***********
    Original code:
    CONFIG = CONFIG / %1011

    Fixed code:
    CONFIG = CONFIG | %1011

    The "|" (OR operator) is needed here, instead of the "/" (DIVIDE operator).
    FYI, the "|" is located on the keyboard above the "\". It looks like two vertical dashes.


    The rest of the code looks fine.

    Dave G
  • GuidoGuido Posts: 195
    edited 2005-10-05 21:37
    Dave, Thank You very much!!!!
    See you can teach an old Italian new tricks......I did not know where that staright up and down line was!!!!! Now I know and that was all I had to change to make it work...Thanks again for your help and time. I really do appreciate it.
    Guido
Sign In or Register to comment.