Parallax, Inc. • BS2p “Plus Pack” (#45184) • 10/2001
Page 50
PP_DS2405.BSP
•
Assemble DS2405 circuit on breadboard
-- use on-board 4.7K resistor (R1) for 1-Wire pull-up
' -----[ Title ]----------------------------------------------------------------
'
' BS2p Plus Pack
'
' File...... PP_DS2405.BSP
' Purpose... Simple DS2405 addressable switch demo
' Author.... Parallax
' E-mail.... [email protected]
' Started...
' Updated... 26 SEP 2001
' {$STAMP BS2p}
' -----[ Program Description ]--------------------------------------------------
'
' Flashes an LED with a DS2405 addressable switch. In this demo, the LED
' status follows a bit in a randomly generated variable.
' Note that the sink capability of the DS2405 is only 4 mA. Use at least 1K
' in series with the LED.
'
' Note: The DS2405 is toggled. Its current status is available only after
' addressing the device -- which also toggles it. Status (0 = on) of the
' device is read in bit mode after addressing it with Match ROM.
'
' Refer to PP_DS1822-2.BSP for an example of dealing with multiple 1-Wire
' devices on the same pin.
' -----[ Revision History ]-----------------------------------------------------
'