How do I poll the register of another device?


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2008
    Posts
    52

    Default How do I poll the register of another device?

    The datasheet of the MT8888 DTMF transceiver says to read the status register and if bit one is set, do the next step. The datasheet says to send b7, b6 and b5 as %110. Do I make portb = %11000000? On the next statement do I say "If portb.1 = 1 then next step"? I'm kind of stuck and any enlightenment would sure help.

    Thanks, Don

    While thinking about it more, Can I send %11000000 on portb, then "Trisb = $1111111" then do the If Then statement to check if b1 is set?
    Last edited by dbachman; - 14th December 2008 at 23:09.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dbachman View Post
    The datasheet of the MT8888 DTMF transceiver says to read the status register and if bit one is set, do the next step. The datasheet says to send b7, b6 and b5 as %110. Do I make portb = %11000000? On the next statement do I say "If portb.1 = 1 then next step"? I'm kind of stuck and any enlightenment would sure help.
    Not seeing any reference to b7,b6,b5 in the datasheet (MT8888C from Mitel/Zarlink) or a couple of other datasheets.
    Which datasheet are you using?

  3. #3
    Join Date
    Oct 2008
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    Hi Skimask,

    On Page 4-101, the typical control sequence for burst mode applications:

    I have wired RSO as portb.7, WR as portb.6 and RD as portb.5.

    When I send one of those sequences such as 'Write to transmit data register'
    I send %00100111 where I have called RSO -b7(or bit7), WR - b6(or bit6) and RD- b5(or bit5) - portb.5 (b5) is not wired and b3-b0 (bit3 - bit0) is the data.

    I hope this makes sense to you.

    Thanks, Don

  4. #4
    Join Date
    Oct 2008
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    I have wired RSO as portb.7, WR as portb.6 and RD as portb.5.

    - portb.5 (b5) is not wired and b3-b0 (bit3 - bit0) is the data.
    The above sould have said:

    I have wired RSO as portb.7, WR as portb.6 and RD as portb.5.

    - portb.4 (b4) is not wired and b3-b0 (bit3 - bit0) is the data.


    I hope this makes sense to you.

    Thanks, Don
    Last edited by dbachman; - 15th December 2008 at 15:02.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dbachman View Post
    The above sould have said:
    I have wired RSO as portb.7, WR as portb.6 and RD as portb.5.
    - portb.4 (b4) is not wired and b3-b0 (bit3 - bit0) is the data.
    I hope this makes sense to you.
    Thanks, Don
    Yep, that makes sense now.
    More later when I hit the datasheet a bit more...

    You got any code to work with yet? Show it...

  6. #6
    Join Date
    Oct 2008
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    This is what I have been trying:

    Code:
    OSCCON = $60 ' Set up internal oscillator
    x var byte
    dtmf var byte
     
    CS var portb.4 'Enable or disable MT8888
    RD var portb.5 'Read Microprocessor input
    WR var portb.6 'Write Microprocessor input
    RS var portb.7 'Register Select
    
    Send_DTMF:
    TRISB = %00000000
    pause 100
    portb = %10101101 'Send Control Register A
    pause 100
    portb = %10100000 'Send Control Register B
    pause 100
    portb = %00100111 'Send digit = 7
    pause 100
    portb = %00100101 '    Send digit = 5
    pause 100
    
    Goto Send_DTMF
    I should mention that this part of the code is just trying to get the thing to spit out a DTMF tone. Beyond that I would need to poll the status register.

    Thanks for taking the time to help,

    Don
    Last edited by dbachman; - 16th December 2008 at 01:37. Reason: Added more info

Similar Threads

  1. Watchdog Timers
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th August 2014, 18:03
  2. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 20:31
  3. PIC16F877A pwm use for IR transmission
    By mcbeasleyjr in forum General
    Replies: 0
    Last Post: - 11th July 2009, 18:51
  4. MX7705 or AD7705 experience
    By FM11 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th January 2006, 21:54
  5. @ Device Parameters
    By Randy_Suwanee in forum General
    Replies: 2
    Last Post: - 11th August 2004, 14:40

Members who have read this thread : 0

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