Shop OBEX P1 Docs P2 Docs Learn Events
convert 12 bit parallel to outputdata for SHIFTOUT — Parallax Forums

convert 12 bit parallel to outputdata for SHIFTOUT

ArchiverArchiver Posts: 46,084
edited 2004-04-16 18:14 in General Discussion
How could I convert 12 bit parallel to OutputData for SHIFTOUT function?

Can I have a little example showing how to do that?

Thanks,

Lee

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-04-14 00:36
    In a message dated 4/13/2004 7:33:59 PM Eastern Daylight Time,
    huy_le123@y... writes:


    > How could I convert 12 bit parallel to OutputData for SHIFTOUT function?
    >
    > Can I have a little example showing how to do that?
    >

    The shiftout command will only handle bytes. If your variable is a word, you
    could shiftout variable.high byte, variable .lowbyte.

    Sid


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-14 01:39
    Sure...

    SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]someData\12]

    This is covered in the manual (hint) and the help file (hint).

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: huy_le123 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ijSpI5qREiI3RptnyAG3FjsemKFfVPFnDVYOFypmdkFF4tGEsIL7Jg8MmMyktPUV-kww34hPq3ZrvUUT]huy_le123@y...[/url
    Sent: Tuesday, April 13, 2004 6:33 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] convert 12 bit parallel to outputdata for
    SHIFTOUT



    How could I convert 12 bit parallel to OutputData for SHIFTOUT function?

    Can I have a little example showing how to do that?

    Thanks,

    Lee
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-14 01:40
    Not so, Sid, SHIFTOUT can handle up to 16 bits. If you desire something
    other than 8 bits, then you must specify the bit count with the \
    parameter after the output data.

    SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]outputData\12]

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Newzed@a... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=jOWdEsJKfGmbr4yTroU-UrSy7YSUQMGYLzO3l1TygCLQnCoUuzNJWJm-uJzsBN1FkP5T2T8kAfc]Newzed@a...[/url
    Sent: Tuesday, April 13, 2004 6:36 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] convert 12 bit parallel to outputdata for
    SHIFTOUT


    In a message dated 4/13/2004 7:33:59 PM Eastern Daylight Time,
    huy_le123@y... writes:


    > How could I convert 12 bit parallel to OutputData for SHIFTOUT
    > function?
    >
    > Can I have a little example showing how to do that?
    >

    The shiftout command will only handle bytes. If your variable is a
    word, you
    could shiftout variable.high byte, variable .lowbyte.

    Sid
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-14 08:29
    Thanks a lot for your help.

    Another issue, there are 36 clocks required to clock all the data,
    but my data is only 8 bit. What can i do?

    here is little sample code i wrote to generate 8 clock pulses while
    writing each bit, but i need some helps to generate 36 clock pulse

    DAC_CE CON 0
    DAC_DATA CON 1
    DAC_CLK CON 2

    wTemp VAR BYTE

    LOW DAC_CE
    wTemp = $100
    SHIFTOUT DAC_DATA,DAC_CLK,msbfirst,[noparse][[/noparse]wTemp]
    HIGH DAC_CE

    I appreciate for your helps,

    Lee

    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > Sure...
    >
    > SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]someData\12]
    >
    > This is covered in the manual (hint) and the help file (hint).
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > Sent: Tuesday, April 13, 2004 6:33 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] convert 12 bit parallel to outputdata for
    > SHIFTOUT
    >
    >
    >
    > How could I convert 12 bit parallel to OutputData for SHIFTOUT
    function?
    >
    > Can I have a little example showing how to do that?
    >
    > Thanks,
    >
    > Lee
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-14 14:17
    What device are you working with?

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: huy_le123 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=cHlvsyf5kUNoSITjK6sSZEe8LDOkqDr3CoPrnLO_LJ9zZtQ4OFS6R2T-gyfe-k6IwMenyWz493j8TBo]huy_le123@y...[/url
    Sent: Wednesday, April 14, 2004 2:29 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    SHIFTOUT


    Thanks a lot for your help.

    Another issue, there are 36 clocks required to clock all the data,
    but my data is only 8 bit. What can i do?

    here is little sample code i wrote to generate 8 clock pulses while
    writing each bit, but i need some helps to generate 36 clock pulse

    DAC_CE CON 0
    DAC_DATA CON 1
    DAC_CLK CON 2

    wTemp VAR BYTE

    LOW DAC_CE
    wTemp = $100
    SHIFTOUT DAC_DATA,DAC_CLK,msbfirst,[noparse][[/noparse]wTemp]
    HIGH DAC_CE

    I appreciate for your helps,

    Lee

    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > Sure...
    >
    > SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]someData\12]
    >
    > This is covered in the manual (hint) and the help file (hint).
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > Sent: Tuesday, April 13, 2004 6:33 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] convert 12 bit parallel to outputdata for
    > SHIFTOUT
    >
    >
    >
    > How could I convert 12 bit parallel to OutputData for SHIFTOUT
    function?
    >
    > Can I have a little example showing how to do that?
    >
    > Thanks,
    >
    > Lee



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-14 15:39
    I'm using Basic Stamp 2p40 module. Thanks

    Lee

    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > What device are you working with?
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > Sent: Wednesday, April 14, 2004 2:29 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    > SHIFTOUT
    >
    >
    > Thanks a lot for your help.
    >
    > Another issue, there are 36 clocks required to clock all the data,
    > but my data is only 8 bit. What can i do?
    >
    > here is little sample code i wrote to generate 8 clock pulses while
    > writing each bit, but i need some helps to generate 36 clock pulse
    >
    > DAC_CE CON 0
    > DAC_DATA CON 1
    > DAC_CLK CON 2
    >
    > wTemp VAR BYTE
    >
    > LOW DAC_CE
    > wTemp = $100
    > SHIFTOUT DAC_DATA,DAC_CLK,msbfirst,[noparse][[/noparse]wTemp]
    > HIGH DAC_CE
    >
    > I appreciate for your helps,
    >
    > Lee
    >
    > --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    > wrote:
    > > Sure...
    > >
    > > SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]someData\12]
    > >
    > > This is covered in the manual (hint) and the help file (hint).
    > >
    > > -- Jon Williams
    > > -- Applications Engineer, Parallax
    > > -- Dallas Office
    > >
    > >
    > >
    Original Message
    > > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > > Sent: Tuesday, April 13, 2004 6:33 PM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] convert 12 bit parallel to outputdata for
    > > SHIFTOUT
    > >
    > >
    > >
    > > How could I convert 12 bit parallel to OutputData for SHIFTOUT
    > function?
    > >
    > > Can I have a little example showing how to do that?
    > >
    > > Thanks,
    > >
    > > Lee
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    Subject
    > and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
    >
    > This message has been scanned by WebShield. Please report SPAM to
    > abuse@p...
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-14 17:08
    We knew that part ... what are you trying to communicate with?

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: huy_le123 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=pUp0p5WRO4OY3H_R8X0rY5rBq91uXoe5quFSX7f4qe-DA45DhuFIFvDui7Nv2CPq97HUGy4xJNIVXg]huy_le123@y...[/url
    Sent: Wednesday, April 14, 2004 9:40 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    SHIFTOUT



    I'm using Basic Stamp 2p40 module. Thanks

    Lee

    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > What device are you working with?
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > Sent: Wednesday, April 14, 2004 2:29 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    > SHIFTOUT
    >
    >
    > Thanks a lot for your help.
    >
    > Another issue, there are 36 clocks required to clock all the data,
    > but my data is only 8 bit. What can i do?
    >
    > here is little sample code i wrote to generate 8 clock pulses while
    > writing each bit, but i need some helps to generate 36 clock pulse
    >
    > DAC_CE CON 0
    > DAC_DATA CON 1
    > DAC_CLK CON 2
    >
    > wTemp VAR BYTE
    >
    > LOW DAC_CE
    > wTemp = $100
    > SHIFTOUT DAC_DATA,DAC_CLK,msbfirst,[noparse][[/noparse]wTemp]
    > HIGH DAC_CE
    >
    > I appreciate for your helps,
    >
    > Lee
    >
    > --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    > wrote:
    > > Sure...
    > >
    > > SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]someData\12]
    > >
    > > This is covered in the manual (hint) and the help file (hint).
    > >
    > > -- Jon Williams
    > > -- Applications Engineer, Parallax
    > > -- Dallas Office
    > >
    > >
    > >
    Original Message
    > > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > > Sent: Tuesday, April 13, 2004 6:33 PM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] convert 12 bit parallel to outputdata for
    > > SHIFTOUT
    > >
    > >
    > >
    > > How could I convert 12 bit parallel to OutputData for SHIFTOUT
    > function?
    > >
    > > Can I have a little example showing how to do that?
    > >
    > > Thanks,
    > >
    > > Lee
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    Subject
    > and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
    >
    > This message has been scanned by WebShield. Please report SPAM to
    > abuse@p...



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-14 17:29
    Sorry, i'm trying to comunicate with 4 digit 7 segment LED display with Serial
    driver from :

    http://www.barcodemall.com/b14m04nr.html (please take a quick look at the
    datasheet from this page).

    Thanks,

    Lee


    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...> wrote:
    > We knew that part ... what are you trying to communicate with?
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > Sent: Wednesday, April 14, 2004 9:40 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    > SHIFTOUT
    >
    >
    >
    > I'm using Basic Stamp 2p40 module. Thanks
    >
    > Lee
    >
    > --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    > wrote:
    > > What device are you working with?
    > >
    > > -- Jon Williams
    > > -- Applications Engineer, Parallax
    > > -- Dallas Office
    > >
    > >
    > >
    Original Message
    > > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > > Sent: Wednesday, April 14, 2004 2:29 AM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    > > SHIFTOUT
    > >
    > >
    > > Thanks a lot for your help.
    > >
    > > Another issue, there are 36 clocks required to clock all the data,
    > > but my data is only 8 bit. What can i do?
    > >
    > > here is little sample code i wrote to generate 8 clock pulses while
    > > writing each bit, but i need some helps to generate 36 clock pulse
    > >
    > > DAC_CE CON 0
    > > DAC_DATA CON 1
    > > DAC_CLK CON 2
    > >
    > > wTemp VAR BYTE
    > >
    > > LOW DAC_CE
    > > wTemp = $100
    > > SHIFTOUT DAC_DATA,DAC_CLK,msbfirst,[noparse][[/noparse]wTemp]
    > > HIGH DAC_CE
    > >
    > > I appreciate for your helps,
    > >
    > > Lee
    > >
    > > --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    > > wrote:
    > > > Sure...
    > > >
    > > > SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]someData\12]
    > > >
    > > > This is covered in the manual (hint) and the help file (hint).
    > > >
    > > > -- Jon Williams
    > > > -- Applications Engineer, Parallax
    > > > -- Dallas Office
    > > >
    > > >
    > > >
    Original Message
    > > > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > > > Sent: Tuesday, April 13, 2004 6:33 PM
    > > > To: basicstamps@yahoogroups.com
    > > > Subject: [noparse][[/noparse]basicstamps] convert 12 bit parallel to outputdata for
    > > > SHIFTOUT
    > > >
    > > >
    > > >
    > > > How could I convert 12 bit parallel to OutputData for SHIFTOUT
    > > function?
    > > >
    > > > Can I have a little example showing how to do that?
    > > >
    > > > Thanks,
    > > >
    > > > Lee
    > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    > Subject
    > > and Body of the message will be ignored.
    > >
    > > Yahoo! Groups Links
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > This message has been scanned by WebShield. Please report SPAM to
    > > abuse@p...
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
    >
    > This message has been scanned by WebShield. Please report SPAM to
    > abuse@p...
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-14 17:57
    Someone else was having trouble with that part back in January and I
    posted a fragment that I believe with work. Luckily, SHIFTOUT is very
    flexible and can deal with the needs of this device. I believe this
    will work for you (refer to the docs):

    LOW CE
    SHIFTOUT Dpin, Cpin, LSBFIRST, [noparse][[/noparse]1\1, segs0\8, segs1\8, segs2\8,
    segs3\8, an1\1, an2\1, 0\1]
    HIGH CE

    The docs don't make clear if the start bit is supposed to be a 1 or 0,
    so you may have to change the initial 1 in the output steam above to 0.
    Note that the \8 additions are not required (the function defaults to
    eight bits), I'm just doing it as good form to be absolutely clear. The
    variables called segs0 - segs3 will contain the bit patterns for your
    segments. You can use a LOOKUP table to convert a number into the
    proper segment bit pattern.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: huy_le123 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=MKhFmI9IXYKs02AE2ARdNCrW61ivSqjJABWU0hJ86SDajhv-bBE9z61G1BCjd8HcXWGr1sv6uDGU]huy_le123@y...[/url
    Sent: Wednesday, April 14, 2004 11:29 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    SHIFTOUT



    Sorry, i'm trying to comunicate with 4 digit 7 segment LED display with
    Serial driver from :

    http://www.barcodemall.com/b14m04nr.html (please take a quick look at
    the datasheet from this page).

    Thanks,

    Lee


    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > We knew that part ... what are you trying to communicate with?
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > Sent: Wednesday, April 14, 2004 9:40 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    > SHIFTOUT
    >
    >
    >
    > I'm using Basic Stamp 2p40 module. Thanks
    >
    > Lee
    >
    > --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    > wrote:
    > > What device are you working with?
    > >
    > > -- Jon Williams
    > > -- Applications Engineer, Parallax
    > > -- Dallas Office
    > >
    > >
    > >
    Original Message
    > > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > > Sent: Wednesday, April 14, 2004 2:29 AM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for

    > > SHIFTOUT
    > >
    > >
    > > Thanks a lot for your help.
    > >
    > > Another issue, there are 36 clocks required to clock all the data,
    > > but my data is only 8 bit. What can i do?
    > >
    > > here is little sample code i wrote to generate 8 clock pulses while
    > > writing each bit, but i need some helps to generate 36 clock pulse
    > >
    > > DAC_CE CON 0
    > > DAC_DATA CON 1
    > > DAC_CLK CON 2
    > >
    > > wTemp VAR BYTE
    > >
    > > LOW DAC_CE
    > > wTemp = $100
    > > SHIFTOUT DAC_DATA,DAC_CLK,msbfirst,[noparse][[/noparse]wTemp]
    > > HIGH DAC_CE
    > >
    > > I appreciate for your helps,
    > >
    > > Lee
    > >
    > > --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    > > wrote:
    > > > Sure...
    > > >
    > > > SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]someData\12]
    > > >
    > > > This is covered in the manual (hint) and the help file (hint).
    > > >
    > > > -- Jon Williams
    > > > -- Applications Engineer, Parallax
    > > > -- Dallas Office
    > > >
    > > >
    > > >
    Original Message
    > > > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > > > Sent: Tuesday, April 13, 2004 6:33 PM
    > > > To: basicstamps@yahoogroups.com
    > > > Subject: [noparse][[/noparse]basicstamps] convert 12 bit parallel to outputdata for
    > > > SHIFTOUT
    > > >
    > > >
    > > >
    > > > How could I convert 12 bit parallel to OutputData for SHIFTOUT
    > > function?
    > > >
    > > > Can I have a little example showing how to do that?
    > > >
    > > > Thanks,
    > > >
    > > > Lee
    > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    > Subject
    > > and Body of the message will be ignored.
    > >
    > > Yahoo! Groups Links
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > This message has been scanned by WebShield. Please report SPAM to
    > > abuse@p...
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
    >
    > This message has been scanned by WebShield. Please report SPAM to
    > abuse@p...



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-16 17:25
    I have tested it out with the way you suggested. It works great. I would like
    to say thank you and appreciate all the helps.

    Lee

    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...> wrote:
    > Someone else was having trouble with that part back in January and I
    > posted a fragment that I believe with work. Luckily, SHIFTOUT is very
    > flexible and can deal with the needs of this device. I believe this
    > will work for you (refer to the docs):
    >
    > LOW CE
    > SHIFTOUT Dpin, Cpin, LSBFIRST, [noparse][[/noparse]1\1, segs0\8, segs1\8, segs2\8,
    > segs3\8, an1\1, an2\1, 0\1]
    > HIGH CE
    >
    > The docs don't make clear if the start bit is supposed to be a 1 or 0,
    > so you may have to change the initial 1 in the output steam above to 0.
    > Note that the \8 additions are not required (the function defaults to
    > eight bits), I'm just doing it as good form to be absolutely clear. The
    > variables called segs0 - segs3 will contain the bit patterns for your
    > segments. You can use a LOOKUP table to convert a number into the
    > proper segment bit pattern.
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > Sent: Wednesday, April 14, 2004 11:29 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    > SHIFTOUT
    >
    >
    >
    > Sorry, i'm trying to comunicate with 4 digit 7 segment LED display with
    > Serial driver from :
    >
    > http://www.barcodemall.com/b14m04nr.html (please take a quick look at
    > the datasheet from this page).
    >
    > Thanks,
    >
    > Lee
    >
    >
    > --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    > wrote:
    > > We knew that part ... what are you trying to communicate with?
    > >
    > > -- Jon Williams
    > > -- Applications Engineer, Parallax
    > > -- Dallas Office
    > >
    > >
    > >
    Original Message
    > > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > > Sent: Wednesday, April 14, 2004 9:40 AM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    > > SHIFTOUT
    > >
    > >
    > >
    > > I'm using Basic Stamp 2p40 module. Thanks
    > >
    > > Lee
    > >
    > > --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    > > wrote:
    > > > What device are you working with?
    > > >
    > > > -- Jon Williams
    > > > -- Applications Engineer, Parallax
    > > > -- Dallas Office
    > > >
    > > >
    > > >
    Original Message
    > > > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > > > Sent: Wednesday, April 14, 2004 2:29 AM
    > > > To: basicstamps@yahoogroups.com
    > > > Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    >
    > > > SHIFTOUT
    > > >
    > > >
    > > > Thanks a lot for your help.
    > > >
    > > > Another issue, there are 36 clocks required to clock all the data,
    > > > but my data is only 8 bit. What can i do?
    > > >
    > > > here is little sample code i wrote to generate 8 clock pulses while
    > > > writing each bit, but i need some helps to generate 36 clock pulse
    > > >
    > > > DAC_CE CON 0
    > > > DAC_DATA CON 1
    > > > DAC_CLK CON 2
    > > >
    > > > wTemp VAR BYTE
    > > >
    > > > LOW DAC_CE
    > > > wTemp = $100
    > > > SHIFTOUT DAC_DATA,DAC_CLK,msbfirst,[noparse][[/noparse]wTemp]
    > > > HIGH DAC_CE
    > > >
    > > > I appreciate for your helps,
    > > >
    > > > Lee
    > > >
    > > > --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    > > > wrote:
    > > > > Sure...
    > > > >
    > > > > SHIFTOUT Dpin, Cpin, Mode, [noparse][[/noparse]someData\12]
    > > > >
    > > > > This is covered in the manual (hint) and the help file (hint).
    > > > >
    > > > > -- Jon Williams
    > > > > -- Applications Engineer, Parallax
    > > > > -- Dallas Office
    > > > >
    > > > >
    > > > >
    Original Message
    > > > > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > > > > Sent: Tuesday, April 13, 2004 6:33 PM
    > > > > To: basicstamps@yahoogroups.com
    > > > > Subject: [noparse][[/noparse]basicstamps] convert 12 bit parallel to outputdata for
    > > > > SHIFTOUT
    > > > >
    > > > >
    > > > >
    > > > > How could I convert 12 bit parallel to OutputData for SHIFTOUT
    > > > function?
    > > > >
    > > > > Can I have a little example showing how to do that?
    > > > >
    > > > > Thanks,
    > > > >
    > > > > Lee
    > > >
    > > >
    > > >
    > > > To UNSUBSCRIBE, just send mail to:
    > > > basicstamps-unsubscribe@yahoogroups.com
    > > > from the same email address that you subscribed. Text in the
    > > Subject
    > > > and Body of the message will be ignored.
    > > >
    > > > Yahoo! Groups Links
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > This message has been scanned by WebShield. Please report SPAM to
    > > > abuse@p...
    > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the Subject
    > > and Body of the message will be ignored.
    > >
    > > Yahoo! Groups Links
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > This message has been scanned by WebShield. Please report SPAM to
    > > abuse@p...
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
    >
    > This message has been scanned by WebShield. Please report SPAM to
    > abuse@p...
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-16 18:14
    You're welcome. Perhaps you could encourage the vendor to include a bit
    of source code in their documentation.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: huy_le123 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=0c-mXK-BDAvZLKcnjA5zp3GHPEMJ6KWuP6p5ON9bWD8f8yjdvtIndU3ev9Ti1Upb8v5xz_jgym9TK8Ng]huy_le123@y...[/url
    Sent: Friday, April 16, 2004 11:26 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    SHIFTOUT



    I have tested it out with the way you suggested. It works great. I
    would like to say thank you and appreciate all the helps.

    Lee

    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > Someone else was having trouble with that part back in January and I
    > posted a fragment that I believe with work. Luckily, SHIFTOUT is very

    > flexible and can deal with the needs of this device. I believe this
    > will work for you (refer to the docs):
    >
    > LOW CE
    > SHIFTOUT Dpin, Cpin, LSBFIRST, [noparse][[/noparse]1\1, segs0\8, segs1\8, segs2\8,
    > segs3\8, an1\1, an2\1, 0\1]
    > HIGH CE
    >
    > The docs don't make clear if the start bit is supposed to be a 1 or 0,

    > so you may have to change the initial 1 in the output steam above to
    > 0. Note that the \8 additions are not required (the function defaults
    > to eight bits), I'm just doing it as good form to be absolutely clear.

    > The variables called segs0 - segs3 will contain the bit patterns for
    > your segments. You can use a LOOKUP table to convert a number into
    > the proper segment bit pattern.
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: huy_le123 [noparse][[/noparse]mailto:huy_le123@y...]
    > Sent: Wednesday, April 14, 2004 11:29 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: convert 12 bit parallel to outputdata for
    > SHIFTOUT
    >
    >
    >
    > Sorry, i'm trying to comunicate with 4 digit 7 segment LED display
    > with Serial driver from :
    >
    > http://www.barcodemall.com/b14m04nr.html (please take a quick look at

    > the datasheet from this page).
    >
    > Thanks,
    >
    > Lee
Sign In or Register to comment.