Slow Down SHIFTOUT and SHIFTIN
Archiver
Posts: 46,084
Hi Everyone:
I am using a BSII, but need the SHIFTOUT and SHIFTIN Commands to
function at a much slower speed than 16KBPS. Does anyone know how
to do this or possibly using a different set of commands to
duplicate SHIFTIN and SHIFTOUT and put pause commands in to slow
down the shift in and out of the Data? Reason for this: I am using
an SHT1X Temp/Humidity Sensor remotely located at the end of a 50
foot cable. The Cap and Ind of the cable is distorting the
waveforms at the high speed of 16KBPS.
I am using a BSII, but need the SHIFTOUT and SHIFTIN Commands to
function at a much slower speed than 16KBPS. Does anyone know how
to do this or possibly using a different set of commands to
duplicate SHIFTIN and SHIFTOUT and put pause commands in to slow
down the shift in and out of the Data? Reason for this: I am using
an SHT1X Temp/Humidity Sensor remotely located at the end of a 50
foot cable. The Cap and Ind of the cable is distorting the
waveforms at the high speed of 16KBPS.
Comments
>I am using a BSII, but need the SHIFTOUT and SHIFTIN Commands to
>function at a much slower speed than 16KBPS. Does anyone know how
>to do this or possibly using a different set of commands to
>duplicate SHIFTIN and SHIFTOUT and put pause commands in to slow
>down the shift in and out of the Data? Reason for this: I am using
>an SHT1X Temp/Humidity Sensor remotely located at the end of a 50
>foot cable. The Cap and Ind of the cable is distorting the
>waveforms at the high speed of 16KBPS.
' equivalent to SHIFTOUT sdaPin,sclk,msbfirst,[noparse][[/noparse]command]
' after chip select or start:
' but slow clocking
FOR ix=7 TO 0 ' 7 TO 0 is msbfirst
sdaPin = command.bit0(ix)
PULSOUT sclk,8192 ' ~8 millisecond clock pulse
NEXT
' equivalent to SHIFTIN sdaPin,sclk,msbpre,[noparse][[/noparse]result]
' after chip select or start:
' but slow clocking
FOR ix=7 TO 0 ' 7 TO 0 is msb
result.bit0(ix) = sdaPin ' result valid pre clock pulse
PULSOUT sclk,8192 ' ~8 millisecond clock pulse
NEXT
-- Tracy
[noparse][[/noparse]Non-text portions of this message have been removed]