SEROUT Just Garbage!


Results 1 to 37 of 37

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    you don't need those
    DEFINE CHAR_PACING 1000
    DEFINE OSC 4
    OPTION_REG.7 = 0 ' gpio 0 - 2 digital
    WPU = 255 ' week pull ups on all pins


    AND you must set the OSCCAL to get accuracy with SEROUT. I hope your OSCCAL is not erase as now...

    at the end your code will look like this.


    Code:
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON
        ' Internal Oscillator
        ' Enable watch dog timer
        ' Enable power up timer
        ' Disable MCLR pin
        ' Enable brown out detect
    DEFINE OSCCAL_1K 1
    INCLUDE "modedefs.bas"
    TRISIO.0 = 0 ' set GPIO.0 as output
    CMCON = 7 ' turn off analog comparator
    
    Pause 200 ' Allow pic to Stabilize 
    
    loop:
    
    SerOut GPIO.0,N2400,["Hello World"]
    Pause 1000
    SerOut GPIO.0,N2400,["abc",13,10]
    Pause 4000
    GoTo loop
    and this one is working @2400 baud

    The most important thing here is to set the OSCCAL at the begining.

    hope this help you
    Last edited by mister_e; - 31st January 2005 at 16:02.
    Steve

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

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. Serout to serial servo
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 12th August 2009, 16:46
  3. Advice-scrutiny for my serial controller
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th December 2008, 17:11
  4. Keypad unlock (as in garage door possibly)
    By Fred in forum Code Examples
    Replies: 5
    Last Post: - 2nd April 2006, 04:26
  5. Replies: 11
    Last Post: - 13th July 2005, 19:26

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