Help!
I would like to control Microchip's MCP4162 Digital Pot with a PIC16F84a using PIC Basic Pro.
I have this code so far. The Digital Pot is a 256 tap pot. I want to set it to any tap position. Blow I am trying to set it to tap 128 just to get it working. But, nothing happens.
'Set these B ports O/P and LOW
Input PORTB.0 'Pushbutton
High PORTB.1 'ChipSelect
Low PORTB.2 'SCK
Low PORTB.3 'SDI
PORTB.1=0 'ChipSelect
ShiftOut PORTB.3, PORTB.2, 1, [128]
PORTB.1=1 'ChipSelect
Bookmarks