Shop OBEX P1 Docs P2 Docs Learn Events
bs2e-ic.....bs2sx-ic conversion please help — Parallax Forums

bs2e-ic.....bs2sx-ic conversion please help

ArchiverArchiver Posts: 46,084
edited 2000-12-09 06:15 in General Discussion
okay,
on the bs2sx-ic the pulsout command is whatever number you tell it
times .8us

so pulsout 1,360 means 360* .8us = 288 microseconds

and on the bs2e-ic it is number times 2us

so pulsout 1, 360 means 360* 2us = 720 microseconds
so to make both times pulse exactly the same i should use pulsout
1,144 for the bs2e-ic and pulsout 1, 360 for the bs2sx-ic
both of those pulsout commands should pulse 288 microseconds right?

so asuming my i am right....the bs2e-ic is not doing the same thing
as the bs2sx-ic does is it possible that the bs2e-ic is a bad chip?

heres the code im using...it works absolutely perfect on bs2sx with
pulsout set to 360---then i change the pulsout to 144 and its not
even close on the bs2e-ic. I think i have a bad chip what do you
think?
steve

'
mSecond var word
Second var word
temp var byte

start 'label
second=0
msecond=0
Button 7,1,255,255,temp,1,go ' will loop until the button is pressed
goto start
go

Button 7,1,255,255,temp,1,show ' will loop until the button is pressed

msecond = msecond + 1 'counts up mseconds
pulsout 1,360
if msecond < 999 then go 'if msecond > 999 goes to next command

msecond = 0 'zeros out msecond

second = second + 1 ' adds 1 to seconds

goto go 'jumps to label

Show: 'label

debug "time"," ",dec second,".",dec msecond,cr
goto start

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-12-09 06:15
    At 07:56 PM Friday 12/8/2000 +0000, you wrote:
    >okay,
    >on the bs2sx-ic the pulsout command is whatever number you tell it
    >times .8us
    >
    >so pulsout 1,360 means 360* .8us = 288 microseconds
    >
    >and on the bs2e-ic it is number times 2us
    >
    >so pulsout 1, 360 means 360* 2us = 720 microseconds
    >
    >so to make both times pulse exactly the same i should use pulsout
    >1,144 for the bs2e-ic and pulsout 1, 360 for the bs2sx-ic
    >both of those pulsout commands should pulse 288 microseconds right?
    >
    >so asuming my i am right....the bs2e-ic is not doing the same thing
    >as the bs2sx-ic does is it possible that the bs2e-ic is a bad chip?

    Steve -

    If I'm reading this correctly, there's nothing "bad" about it. They merely
    operate at different speeds. Is a Volkswagen "bad" because it can't attain
    the speeds of a E-Jag ? I'd think not. I'm not even sure it's a chip
    difference - now (see below).

    >heres the code im using...it works absolutely perfect on bs2sx with
    >pulsout set to 360---then i change the pulsout to 144 and its not
    >even close on the bs2e-ic. I think i have a bad chip what do you
    >think?
    >steve

    Make sure the programs are being loaded. In the BS-2SX one place ' Debug
    "BS-2SX" ' and in the other (the BS-2e) place ' "Debug BS-2e" '. Then you
    can be assured that the proper program is being loaded AND executed. IF
    THEY DO NOT DISPLAY THOSE VALUES, there IS a problem. It can probably be
    solved by using the $STAMP operative ' {$STAMP BS2SX} ' as shown in the
    BS-2SX V1.5 Manual (which see). What one does with the BS-2E I can't say.
    having never used one.

    Additionally, you don't mention which Editor you are using (DOS or
    WINDOWS). If you are using the DOS Editor, please be aware of the following
    caveat from that same manual:

    "The DOS editor can only load up one source code file at a time. Each
    unique BS2SX program
    (of a maximum of eight) to be downloaded to the BS2SX must be downloaded
    separately with a
    unique program ID. NOTE: The Windows version does not have this
    limitation. Pressing ALT+# (where # is a number from 0 to 7) will change
    the ID (shown at the top of the window) of the currently
    visible source code in the editor.

    ==>>This ID is not saved with the program and must be set and verified
    manually<<==
    ==>> each time it is loaded from disk and before each
    download. <<==

    IMHO, this is an Editor problem, NOT a coding or chip problem, but time
    WILL tell.

    Regards,

    Bruce Bates


    >temp var byte '<<<<====== This VARIABLE NEEDS TO BE CLEARED BEFORE USE
    >
    >start 'label
    >second=0
    >msecond=0
    >Button 7,1,255,255,temp,1,go ' will loop until the button is pressed
    >goto start
    >go
    >
    >Button 7,1,255,255,temp,1,show ' will loop until the button is pressed
    >
    >msecond = msecond + 1 'counts up mseconds
    >pulsout 1,360
    >if msecond < 999 then go 'if msecond > 999 goes to next command
    >
    >msecond = 0 'zeros out msecond
    >
    >second = second + 1 ' adds 1 to seconds
    >
    >goto go 'jumps to label
    >
    >Show: 'label
    >
    >debug "time"," ",dec second,".",dec msecond,cr
    >goto start
Sign In or Register to comment.