HSERIN2 not working on PIC18F97J60 ???


Closed Thread
Results 1 to 9 of 9

Hybrid View

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

    Default

    Quote Originally Posted by mister_e View Post
    I haven't go really deep in your code, but usually when you deal with HSERIN(2)/HSEROUT(2), you must use the DEFINEs instead of writing to the PIC registers, unless PBP will assume the default 2400 bauds.
    Ok, thank you for the suggestion.

    I'll try right now.

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

    Default

    Another sleepless night.

    Nothing to do Mister-E. Still the same behaviour even with your suggestions.

    Some hint more:
    In the segment of code where I'm talking about "Do something" and "Do something else", really I'm using the instructions I2CRead and I2CWrite.

    Seems that if I call the sequence:
    HSERIN
    HSEROUT
    I2CREAD
    then the HSERIN does not work anymore

    Again,
    If I remove the checking of the PIR1.5 bit, EVERYTHING IS WORKING !!!!!!
    As per the above code that DOES NOT WORK:

    ReadPort1:
    ....
    IF PIR1.5 = 1 Then
    HSERIN 200, NoData1, [syncByte]
    .....
    .....
    EndIF

    If I remove the line IF PIR1.5 = 1 (and his EndIF, of course) even using:
    HSERIN 10,NoData1,[syncByte] 'ALL IS WORKING FINE, but I miss 10ms each time !!!

    How this is possible?


    Again:
    I'm using Tibbo EM200 that suppose to talk with the serial port 1. His outputs are at CMOS level (HIGH when idle) and I'm using HSERIN. I should consider something in this case?

    Again:
    I've tried SERIN2. Much worste.
    I used:
    SERIN2 PortC.7, 16390, 200, NoData1, [syncByte] 'Inverted mode 38400
    and even
    SERIN2 PortC.7, 6, 200, NoData1, [syncByte] 'True mode 38400
    In both cases, the program pass the checking about PIR1.5 but then is supposed to go to NoData1 in case of no data in 200ms. Well, I don't know where it go, since the LED_48VFault is supposed to be switched off when the program go to NoData1. Instead it still remain switched ON... and the remaining part of the program is still working!!!

    Any idea?
    Should I hire an exorcist?

    Thank you.

Similar Threads

  1. 2x16 lcd not working with pic16f72
    By vu2iia in forum Schematics
    Replies: 4
    Last Post: - 16th February 2011, 14:59
  2. Blink.Bas on 18f45k20 Newbie seeks working example.
    By DiscoEd in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th December 2009, 03:36
  3. Pic 16 F628A not working
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 17th March 2009, 12:26
  4. Second serial port access ( Hserin2 )
    By MegaADY in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th October 2007, 18:01
  5. Hserin not working...
    By robert0 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd August 2005, 12:25

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