Serout/Serout2 and PIC18F97J60 (100 pin)


Results 1 to 11 of 11

Threaded View

  1. #2
    Join Date
    Aug 2006
    Location
    Italy
    Posts
    72

    Default There is something wrong in PBP

    Ok guys,
    it definitively seems that there is something wrong in the PBP library somewhere.
    The Serout (and Serout2), with PBP2.50A, and the program below, it JUST send 2 or 3 random character (yes, sometimes 2, some other times 3...)

    I've putted a line in the code to flash a led to prove that the loop is going, but putting a scope on the output (on the pin PortD.7), I see only the transmission JUST after the reset and then NOTHING ELSE even if the loop is going and the led is flashing. So the instruction Serout2 bla bla bla, it is simply IGNORED! No transmissions at all, neighter the weird one. Just some character after the power-on.

    The chip is again the PIC18F97J60 (100 pins version).

    Any idea?


    Code:
    DEFINE OSC 25                      'Set the Crystal Clock speed
    INCLUDE "modedefs.bas"          'Inline compiler's pre-defined constants
    ADCON0 = 0                          'AD converter module 0 = disabled
    ADCON1 = %00001111            'Set all analog pins to digital
    ADCON2 = %00000000
    CMCON  = %00000111            'Comparator = disabled
    INTCON = %00111000
    INTCON2 = %10000000
    INTCON3 = %00000000
    RCON.7 = %00000000
    EECON2.5 = 0                       'Ethernet Module Disabled
    SSP1CON1.5 = 0                   'Disable SPI 1 and set pins as GPIO
    SSP2CON1.5 = 0                   'Disable SPI 2 and set pins as GPIO
    TRISJ.7 = 0
    TRISD.7 = 0                         'PortD7 = RS-232 TX output for Display
    
    LCD            var PORTD.7
    LED_what    var PORTJ.7
    
    Main:
    SEROUT2 LCD, N9600, ["Hello World",13,10] 
    pause 1000
    LED_what = ~ LED_what
    GOTO Main
    Thank you.
    Last edited by mikebar; - 18th May 2008 at 13:51. Reason: missing modified code

Similar Threads

  1. HSERIN2 not working on PIC18F97J60 ???
    By mikebar in forum Serial
    Replies: 8
    Last Post: - 4th May 2008, 15:20

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