PIC18F4680 to PC via MAX232 (RS232 serial) no output


Results 1 to 3 of 3

Threaded View

  1. #1

    Default PIC18F4680 to PC via MAX232 (RS232 serial) no output

    I have a PIC 18LF4680 that I'm trying to connect via serial rs232 to the pc. I'm using a MAX232 device to convert the TTL signals to rs232. I happened to have this nifty pre-made rs232 connecting pcb device lying around, so I decided to use that instead of building my own circuit and outputting that to serial, but i'm having difficulty in making it work. I have a feeling that the PIC is outputting correctly, but the max232 is output gibberish to the serial port, which is why its not showing up with anything. But I'm not sure about that. Also there are jumpers on the rs232 device (shown in the schematic attached) but i've just left them disconnected (open) because I only want to use pins 2 and 3 of the female serial port for communcation.

    Here is my code for it:
    Code:
        DEFINE OSC 20
        DEFINE HSER_RCSTA 90h  ' Enable Serial PORT
                               ' Enable continuous receive
                               '
        DEFINE HSER_TXSTA 24h  ' Enable transmit
                               ' High baud rate (BRGH=1)
                               '
        DEFINE HSER_SPBRG 129  ' set USART to 9600 baud 
        DEFINE HSER_CLROERR  1 ' Enable automatic overrun error
        
        
            
    Start:
        PAUSE 1 
    
        HSEROUT ["IT WORKED" ,10,13] 
    
        goto start
        
    END
    my configuration settings (my pic is connected to a 20MHz resonator):
    Code:
            __CONFIG    _CONFIG1H, _OSC_HS_1H
            __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
            __CONFIG    _CONFIG3H, _PBADEN_OFF_3H
            __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    Attached are my schematics for the device and the output from pin 25 of the PIC (the square wave one) and output from pin 13 of the MAX232 device (the distorted looking one). I'm using PicStart Plus to program the device, Microcode Studio to compile it, and MPASM to compile the assembly. I'm using Microcode Studio's Serial Communicator to view any output from COM1 with settings: COM1, 9600 baud, No parity, Byte size is 8, 1 stop bit
    Attached Images Attached Images    

Similar Threads

  1. Direct PIC to PC without MAX232
    By acjacques in forum Serial
    Replies: 14
    Last Post: - 23rd October 2014, 21:32
  2. RS232 into 2 PC ports
    By manxman in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th August 2008, 13:33
  3. interfacing to the pc serial port
    By kelangfei in forum General
    Replies: 4
    Last Post: - 7th October 2007, 22:35
  4. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46
  5. Serial communication to PC without a Max232
    By toalan in forum Off Topic
    Replies: 2
    Last Post: - 18th February 2005, 20:33

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