Serout/Serout2 on pin RC6


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,175

    Default

    Thanks Dave. It is not in TXSTA but in RCSTA, bit 7 where the UART is enabled/disaled. But as I stated before, once it is enebled and there are even 1 Hserout command somewhere in the program, I cannot gain control of the port pin. May be I got a defective chip, maybe there is a ghost around. I cannot explain it.

    Before posting usually the manual/data sheet is really dusted good. In vein...

    I will try tomorrow with different system (MCU/PC/Programs).

    Ioannis

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,175

    Default

    I am a little embarrased. I feel like Goofy. Anyway. The problem was the Decimal/Hexadeciml numbers I got confussed.

    Mister-e has involved to this! His utility shows the numbers in Decimal, while the copy variables has a mix of decimal/hex numbers.

    All is working OK now. Sorry for the lost time.

    Ioannis

    P.S. I Attache the test code for On the fly Baud Rate changing.
    Attached Files Attached Files

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Quote Originally Posted by Ioannis View Post
    I am a little embarrased. I feel like Goofy.
    Me too.

    To switch from hardware to software
    Code:
    '# 16F877A 
    DEFINE OSC 20
    X   VAR BYTE
    START:X = X + 1
    HIGH PORTD.2 :PAUSE 250:LOW PORTD.2:PAUSE 250' HEARTBEAT
    RCSTA=$90:TXSTA=$24:SPBRG=129:HSEROUT ["HSER ",DEC X,13,10]
    PAUSE 250:RCSTA=$0:SEROUT2 PORTC.6,84,["SER ",DEC X,13,10]
    GOTO START
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 14:55
  2. DS1820 with 16f688
    By jessey in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd May 2009, 06:07
  3. Serout/Serout2 and PIC18F97J60 (100 pin)
    By mikebar in forum Serial
    Replies: 10
    Last Post: - 20th May 2008, 05:16
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 18:27
  5. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 18:07

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