I'm looking for digital pots for audio volume control (32 position)that are easy to control with a pic. I have read about the serial control protocols, but I'm looking for something that is easier to control using a pic. I'm also looking for digital switches, which can be used to select the input; also controllable with a pic. Any suggestions are appreciated.
switches http://www.maxim-ic.com/SwitchMux.cfm
digital pots http://para.maxim-ic.com/compare.as...342,114356,114357,114377,114378,114379,114380
serial protokoll _is_ easy
some more steps you get with a PGA2310, ready working with pic it woul look like: http://home.tu-clausthal.de/~tpa/PGA/index.html
also a useing the search butto on this board will show loads of information for digital pot, PGA2310, ...
digital pots http://para.maxim-ic.com/compare.as...342,114356,114357,114377,114378,114379,114380
serial protokoll _is_ easy
some more steps you get with a PGA2310, ready working with pic it woul look like: http://home.tu-clausthal.de/~tpa/PGA/index.html
also a useing the search butto on this board will show loads of information for digital pot, PGA2310, ...
What language do you use, what pic do you want to use?
In assembler its straight forward:
PGA_WR
BCF SCLK
BCF CS_PGA ; Chip select
CALL WAIT10
BTFSC volume,7
BSF SDI
BTFSS volume,7
BCF SDI
BSF SCLK ;Bit1
BCF SCLK
BTFSC volume,6
BSF SDI
BTFSS volume,6
BCF SDI
BSF SCLK ;Bit2
........
BSF SCLK ;Bit15
BCF SCLK
BTFSC volume,0
BSF SDI
BTFSS volume,0
BCF SDI
BSF SCLK ;Bit16
BCF SCLK
CALL WAIT10
BCF SDI
CALL WAIT10
BSF CS_PGA ; Chipdeselcet
RETURN
of corse you can also make it nice and pretty with a loop...
In assembler its straight forward:
PGA_WR
BCF SCLK
BCF CS_PGA ; Chip select
CALL WAIT10
BTFSC volume,7
BSF SDI
BTFSS volume,7
BCF SDI
BSF SCLK ;Bit1
BCF SCLK
BTFSC volume,6
BSF SDI
BTFSS volume,6
BCF SDI
BSF SCLK ;Bit2
........
BSF SCLK ;Bit15
BCF SCLK
BTFSC volume,0
BSF SDI
BTFSS volume,0
BCF SDI
BSF SCLK ;Bit16
BCF SCLK
CALL WAIT10
BCF SDI
CALL WAIT10
BSF CS_PGA ; Chipdeselcet
RETURN
of corse you can also make it nice and pretty with a loop...
We (Pieter and me) have this http://home.tu-clausthal.de/~tpa/space/IM002696b.jpg
device running, but firmware is made is assembly. To me it looks there is not much difference between assembly and high level languages on a MC, as most time you need to server hardware of the chip. Advantage is you are not involved in any compiler license and may distribute assembly code and binary free as you want on the net. Also a compiler is limited or does cost money. An assembler is not limited and for free.
Its also with 16F877A, i will put some information on it on my homepage in short time.
device running, but firmware is made is assembly. To me it looks there is not much difference between assembly and high level languages on a MC, as most time you need to server hardware of the chip. Advantage is you are not involved in any compiler license and may distribute assembly code and binary free as you want on the net. Also a compiler is limited or does cost money. An assembler is not limited and for free.
Its also with 16F877A, i will put some information on it on my homepage in short time.
- Status
- This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.