pt2258+16f877 how can i use for 5.1 volume control ?


Closed Thread
Results 1 to 2 of 2
  1. #1
    whyliving's Avatar
    whyliving Guest

    Unhappy 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.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,803


    Did you find this post helpful? Yes | No

    Default

    First of all your data sheet is chopped. The full version is here:

    http://www.princeton.com.tw/webSite/...d=PT2257_4.pdf

    Second, for a 5.1 you need at least 3 devices since you must control 6 channels.

    Ioannis

Similar Threads

  1. 16F877 elapsed time control
    By BerkayT in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 12th February 2009, 17:23
  2. Volume Control On Piezo
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th August 2007, 04:34
  3. ISD4003 & 16F877 Interface
    By sayzer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th December 2006, 17:50
  4. Control RC servo via Parallax Servo Control
    By cibotsan in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th September 2005, 08:18
  5. Volume Control IC's
    By HarryK in forum General
    Replies: 0
    Last Post: - 8th March 2005, 08:46

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts