pt2258+16f877 how can i use for 5.1 volume control ?
hi , everyone. i am noobie in there. im working learn pic.
i wanna build 5.1 ch volume control with pic16f877 and pt2258.and next time lcd and smps control , ir control ....music system...
pt series chip is using i2c protocol.
this pt 2258 datasheet:
http://www.datasheetcatalog.net/data...2/PT2258.shtml
i am training something. this is my code:
Config XT_OSC , WDT_OFF , PWRTE_ON , BODEN_OFF , LVP_OFF , WRTE_ON , CP_OFF , DEBUG_OFF
Device 16F877
XTAL 4
ADCON1=7
Symbol SCL=PORTC.3
Symbol SDA=PORTC.4
Declare I2C_SLOW_BUS On
pause 100
GoSub RST
ANA:
If PORTA.0=1 Then COK
If PORTA.1=1 Then AZ
If PORTA.2=1 Then SUS
If PORTA.3=1 Then GoSub RST
GoTo ANA
COK:
High PORTB.7
High SCL
High SDA
Low SDA
Low SCL
i2cout SDA,SCL ,$88,0 ,[%11010100,%11100010]
High SCL
Low SDA
High SDA
Low SCL
PAUSE 100
Low PORTB.7
GoTo ANA
AZ:
High PORTB.6
High SCL
High SDA
Low SDA
Low SCL
i2cout SDA,SCL ,$88,0 ,[%11010001,%11100001]
High SCL
Low SDA
High SDA
Low SCL
PAUSE 100
Low PORTB.6
GoTo ANA
SUS:
High PORTB.5
High SCL
High SDA
Low SDA
Low SCL
i2cout SDA,SCL ,$88,0 ,[%11111001]
High SCL
Low SDA
High SDA
Low SCL
PAUSE 100
Low PORTB.5
GoTo ANA
RST:
High PORTB.4
High SCL
High SDA
Low SDA
Low SCL
i2cout SDA,SCL ,$88,0 ,[%11000000]
High SCL
Low SDA
High SDA
Low SCL
PAUSE 100
Low PORTB.4
Return
i am write this code but not working.
where is my problem. can you help me?
are u have another example or project for 5.1 ch volume control.
thanks for all.