Ask For Help


Results 1 to 19 of 19

Thread: Ask For Help

Threaded View

  1. #12
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    To make things simple, you'll need to use SHIFTIN/SHIFTOUT in PBP. so it doesn't really matter the PIC I/O you use.

    A while back i used a PIC16F628, Bellow is the hardware assignement i used.
    Code:
        ' I/O Definition
        ' ===============
        '
        TRISA = %00110000    ' PORTA Output on :
                             '         PORTA<3:0> : LCD data 
                             '         PORTA<7:6> : LCD RS & E bit
                             '
                             ' PORTA Input on :
                             '         PORTA.4 : "ALT PLAY" Button
                             '         PORTA.5 : "PLAY" button    
                             '
        TRISB = %11110001    ' PORTB Output on : 
                             '         PORTB.1 : ISD4002 SS pin 
                             '         PORTB.2 : ISD4002 SCLK pin 
                             '         PORTB.3 : ISD4002 MOSI pin
                             '
                             ' PORTB Input on :
                             '         PORTB.0 : ISD4002 INT pin
                             '         PORTB.4 : ISD4002 MISO pin
                             '         PORTB.5 : ISD4002 RAC pin
                             '         PORTB.6 : "SETUP" button
                             '         PORTB.7 : "RECORD" button
    Later to write to the ISD chip, i used
    Code:
        ss = 0
        shiftout MOSI,SCLK,LSBFIRST,[ISDword\16]
        ss = 1
    to read from
    Code:
            ss=0
            shiftin miso,sclk,lsbpre,[isdpointer\16]
            ss=1
    HTH
    Last edited by mister_e; - 22nd July 2006 at 21:53.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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