Serial Communication Problems (Strange!!)


Closed Thread
Results 1 to 2 of 2
  1. #1

    Angry Serial Communication Problems (Strange!!)

    Hello everybody! I´d like someone to help here please I really need it!! Here the situation. I´m working with a Pic 18F4550, I´m running a 40 Mhz speed and I want to use the Tx and Rx but, when I connect the serial cable to de Max232 and to the serial port on my computer, it seems that my MicroController die. Even if I don´t have it configurated to serial communicacion it goes off. I though it would be the max232 circuit I was using but when I used another one it just happened the same. I am desesperate and do not know what to do or what the posibly problem could be so, if someone could please give a tip to me I´d be very very gratefull, seriously.
    Thanks to all of you who took a little time to read this. Oh, I´m sending here the code which I wrote just as a test to see if it´d work out. I´m also sending the .INC file. Thank you very much.

    Have a nice day!

    Armando Herjim.

    --------------------------------------------------------------------------
    18F4550.INC
    --------------------------------------------------------------------------
    ;************************************************* ***************
    ;* 18F4550.INC *
    ;* *
    ;* By : Leonard Zerman, Jeff Schmoyer *
    ;* Notice : Copyright (c) 2004 microEngineering Labs, Inc. *
    ;* All Rights Reserved *
    ;* Date : 12/31/04 *
    ;* Version : 2.46 *
    ;* Notes : *
    ;************************************************* ***************
    NOLIST
    ifdef PM_USED
    LIST
    "Error: PM does not support this device. Use MPASM."
    NOLIST
    else
    LIST
    LIST p = 18F4550, r = dec, w = -311, f = inhx32
    INCLUDE "P18F4550.INC" ; MPASM Header
    CONFIG USBDIV = 1
    CONFIG CPUDIV = OSC3_PLL4
    CONFIG PLLDIV = 1
    CONFIG IESO = ON
    CONFIG FCMEM = OFF
    CONFIG FOSC = HSPLL_HS
    CONFIG PBADEN = OFF

    ;__CONFIG _CONFIG1L, _PLLDIV_3_1L & _CPUDIV_OSC1_PLL2_1L
    ;__CONFIG _CONFIG1H, _FOSC_XT_XT_1H
    ;__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
    ;__CONFIG _CONFIG3H, _PBADEN_OFF_3H
    ;__CONFIG _CONFIG4L, _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L
    NOLIST
    endif
    LIST
    EEPROM_START EQU 0F00000h
    BLOCK_SIZE EQU 32

    -----------------------------------------------------------------------------------------------------------------------------------------------------

    --------------------------------------------------------------------------
    Prueba.bas
    --------------------------------------------------------------------------
    INCLUDE "MODEDEFS.BAS"
    OSCCON = $D0 'Set OSCILLATOR CONTROL REGISTER TO 1101 0000
    'Oscillator control register para seleccionar el modo de clock

    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 24h
    DEFINE HSER_BAUD 115200
    DEFINE HSER_SPBRG 25
    DEFINE OSC 40

    da var byte[10]

    ;-----------------------------------------------------------------

    pause 200

    main:
    high porta.2
    pause 500
    high portb.0
    pause 500
    low porta.2
    pause 500
    low portb.0
    pause 500

    ;---------------------------------------------------------------

    high portb.7
    hserout ["Armando 130, 256 epacion a ·$/&$&( ;", 10, 13]
    pause 500
    low portb.7

    ;----------------------
    pause 500
    ;----------------------

    high portb.7
    hserin [str da\10]
    low portb.7
    ;-----------------------
    hserout [10,13]
    hserout [str da\10 ,10, 13]



    GoTo main
    -----------------------------------------------------------------------------------------------------------------------------------------------------

    thanks a lot!!

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405

    Default

    My guess would be a problem with the MAX232 wiring. Check your wiring against this schematic http://www.microengineeringlabs.com/...s/LABXUSCH.PDF
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Replies: 18
    Last Post: - 4th July 2017, 14:26
  2. Serial communication problems
    By amindzo in forum Serial
    Replies: 0
    Last Post: - 28th August 2006, 17:48
  3. Serial communication problems
    By amindzo in forum General
    Replies: 0
    Last Post: - 28th August 2006, 17:47
  4. serial communication problems
    By bronorisp in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 20th January 2005, 23:50
  5. Replies: 8
    Last Post: - 11th November 2004, 20:08

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