MCP41050 <- Working code sample
Archiver
Posts: 46,084
Hi All,
With Sid's help, I got the MCP41050 going. Not the MAX41050 as I mistakenly
said earlier. Anyway, I thought I'd post a code snip:
cs con 0
clk con 1
si con 2
potData var word
potSet var potData.lowbyte
potData = %00010000100000000
main:
pause 100
debug "PotSet: ", dec potSet,cr
low CS
shiftout si,sck,msbfirst,[noparse][[/noparse]potData\16]
high cs
if potSet = 255 then
potset = 0
goto main
endif
potSet = potSet +1
goto main
Thanks to all for the help,
Jonathan
www.madlabs.info
With Sid's help, I got the MCP41050 going. Not the MAX41050 as I mistakenly
said earlier. Anyway, I thought I'd post a code snip:
cs con 0
clk con 1
si con 2
potData var word
potSet var potData.lowbyte
potData = %00010000100000000
main:
pause 100
debug "PotSet: ", dec potSet,cr
low CS
shiftout si,sck,msbfirst,[noparse][[/noparse]potData\16]
high cs
if potSet = 255 then
potset = 0
goto main
endif
potSet = potSet +1
goto main
Thanks to all for the help,
Jonathan
www.madlabs.info