16f887 and hserin/out


Results 1 to 13 of 13

Threaded View

  1. #1

    Default 16f887 and hserin/out

    Hi All

    Just wondering if anyone has encountered weird behaviour with HSERIN/OUT using a 16F887 at all ?

    I was using the 16F887 (hserout) as a receiver for data sent from a 18F4520 (hserin) as a receiver.

    When I switch the roles so that the 16F887 is the transmitter and the 184520 is the receiver ... I either get mismatched data or no data at all !

    Is it possible I have trhe wrong config settings for the registers on either side at all ?
    for the 16F887 I have this
    Code:
     'Set comparators off
    CM1CON0 = %00000000
    CM2CON0 = %00000000
    
    OSCCON = %01110001          'Int CLK 8MHz
    ANSEL = %00000000           'All digital
    OPTION_REG.7 = 0            'Weak pull-ups enabled
    
    DEFINE OSC 8                '8MHz
    'TRIS statements
            TRISA  = %00000000 
            TRISB = %11111111  'for 4x4 keypad all input
            TRISC = %10100000 'PORTC.7 and C.5 are input
            TRISD = %00000000
            TRISE.0 = 0
            TRISE.1 = 0
            TRISE.2 = 0
    and for the 18F4520 I have this
    Code:
     OSCCON = $70            'Int CLK 8MHz
            OSCTUNE.6 = 1           'PLL 4x
            ADCON1= %00001111       '$0F = disable A/D converter
            cmcon   =   7 
            INTCON2.7 = 0     'switch pull-ups ON
    '
            DEFINE OSC 32            '4x 8MHz
            TRISA  = %00000000 
            TRISB = %11111111  'for 4x4 keypad all input
            TRISC = %10010000 'PORTC.7 and C.4 are input
            TRISD = %00000000 'all output
            TRISE.0 = 0
            TRISE.1 = 0
            TRISE.2 = 0

    Any suggestion would be appreciated.

    Kind regards
    Dennis
    Last edited by Dennis; - 18th December 2009 at 01:08.

Similar Threads

  1. HSERIN/OUT Wrong
    By Kaldurenik in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 8th October 2007, 10:40
  2. HSERIN/OUT or Serin/Out for AIR Link
    By mankan in forum General
    Replies: 4
    Last Post: - 25th May 2006, 15:19
  3. Hserin
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 20th March 2006, 23:09

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