more rs232 problems


+ Reply to Thread
Results 1 to 13 of 13

Thread: more rs232 problems4222 days old

  1. #1
    pmcleod
    Guest pmcleod's Avatar

    0 Not allowed!

    Question more rs232 problems

    you may or may not recall I had rs232 comms problems a couple of weeks ago, it's still not entirly sorted though I did get comms going one wey quite nicely.
    What happens is panel a send it's variables to panel b, panel b then odifies them taking a few seconds getting input from panel b.
    it's then supposed to send the modified results back to panel a. but I can't make top nor tail of why these results are not being received back by panel a. If I stick a virtual terminal on it in isis I can see data is being sent, but it's not being updated on panel a.

    I'm using
    Code:
     If keyval = 11 Then 
      programmed = 1
         PORTD.1 = 1
         HRSOut "#", paneltype, opencount, closecount, yellowpoint, redpoint, soundtenths, totaloperations, edgetype, programmed :
              PORTD.1 = 0
         DelayMS 1000 : Cls : Print At 1,1, "Values sent     " : Print At 2,1, "unplug" : DelayMS 1600 : GoTo main
    to send and the following to receive

    Code:
    HRSin {180000, timeout},Wait("#"), paneltype, opencount, closecount, yellowpoint, redpoint, soundtenths, totaloperations , edgetype, programmed
    
    '  If programmed = 1 Then
        EWrite 0, [opencount]
        EWrite 2, [closecount]
        EWrite 4, [yellowpoint]
        EWrite 6, [redpoint]
        EWrite 8, [soundtenths]
        EWrite 9, [totaloperations]   
        EWrite 13, [edgetype]
        EWrite 14, [programmed]
    but the variables aren't updates let alone the eeprom.


    I'm going round the bend on this any ideas I can try, I have it running in hardware and protues pro/isis


    TIA
    oh and I've got
    Code:
     HSERIAL_BAUD = 9600 ' Set baud rate to 9600
    
    HSERIAL_RCSTA = %10010000 ' Enable serial port and continuous receive
    HSERIAL_TXSTA = %10100000 ' Enable transmit and asynchronous mode
    HSERIAL_CLEAR = On ' Optionally clear the buffer before receiving
    in both. I don't seem to be able to turn on and off the serial port with mil;tiple HRSERIAL_RCXTA or TXSTA command PDS warns I have multi insytances and igonore the latr ones.

Attention

This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

The advertisements we display are relevant to this web site and your browsing history

Please consider supporting us by disabling your ad blocker.


Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

If you can, please report issues in the forum area WebSite / Forum Issues


Thank you for your attention.

  • #2
    Member SELCUK's Avatar
    Join Date
    Sep 2006
    Posts
    177
    Thumbs Up
    Received: 2
    Given: 0
    Total Downloaded
    696.09 MB

    0 Not allowed!

    Default

    Hi,
    What Type Of Mcu Do You Use, And What Is Xtal Frequency?

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #3
    pmcleod
    Guest pmcleod's Avatar

    0 Not allowed!

    Default

    One is a PIC16F877A one an 876A, both at 8MHz, I've tried with the high bhaud rate select bit both on and off, no different

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #4
    Member SELCUK's Avatar
    Join Date
    Sep 2006
    Posts
    177
    Thumbs Up
    Received: 2
    Given: 0
    Total Downloaded
    696.09 MB

    0 Not allowed!

    Default

    HI,

    DID YOU CHECK YOUR WIRING? Rx (877A)---> Tx(876A), Tx(877A) ---> Rx(876A)

    REGARDS...

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #5
    pmcleod
    Guest pmcleod's Avatar

    0 Not allowed!

    Default

    yes, many times, i'm running around in rings here, I just don't know what else to try next, I'm beginning to despair on this one. I can only now think of going getting some more of the software sorted and comig back in hope that a break from it will provide insipration.
    I've got other things to learn about for these othe bits of the code

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #6
    Prolific Poster See_Mos's Avatar
    Join Date
    Feb 2004
    Posts
    1,287
    Thumbs Up
    Received: 17
    Given: 0
    Total Downloaded
    872.27 MB

    0 Not allowed!

    Default

    Did you check out Protongeeks where you will find a working example of what you need, the programmes I did concentrate on sending fixed length packets of numerical variables for control purposes and uses interrupts to alert the PIC to incoming data.

    It may not look as neat as sending values using the DEC modifier but it has been well tested.
    My RAM is failing

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #7
    Prolific Poster See_Mos's Avatar
    Join Date
    Feb 2004
    Posts
    1,287
    Thumbs Up
    Received: 17
    Given: 0
    Total Downloaded
    872.27 MB

    0 Not allowed!
    My RAM is failing

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #8
    Prolific Poster See_Mos's Avatar
    Join Date
    Feb 2004
    Posts
    1,287
    Thumbs Up
    Received: 17
    Given: 0
    Total Downloaded
    872.27 MB

    0 Not allowed!

    Default

    Talking of Protongeeks, I wonder how Robert is getting on?
    My RAM is failing

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #9
    pmcleod
    Guest pmcleod's Avatar

    0 Not allowed!

    Default

    Thanks, I'd not thought of that, or the sample files, I gave up on the dec modifier as I didn't need it in dec at the transission point only display point and I'd misunderstoof how it worked. What's got me baffled is why I go send one way but not the other.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #10
    pmcleod
    Guest pmcleod's Avatar

    0 Not allowed!

    Default

    would I really need to go interupr driven, given that the pic is doing nothing else at this time, just waiting for the bytes, I guess it won't hurt to use interupts but seems like more I need to understand than I feel ought to be necessary, but I may well have too simplistic view on this.
    I'm off to check the geeks link and samples now, thanks

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #11
    pmcleod
    Guest pmcleod's Avatar

    0 Not allowed!

    Default

    Sometime I don't believe life, I upgraded the compiler to the pre release version and it works, in simulation at least, I'll try the hardware later got to show my wife a good husband for a while now.

    thanks for the advice guys

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #12
    Prolific Poster See_Mos's Avatar
    Join Date
    Feb 2004
    Posts
    1,287
    Thumbs Up
    Received: 17
    Given: 0
    Total Downloaded
    872.27 MB

    0 Not allowed!

    Default

    I found I got more reliable results using interrupts as the receiving PIC is less likely to miss or corrupt data if the exit from a time delay just happens to be at the wrong time relative to the data.

    Without interrupts you have to resend the data until the receiving end acknowledges that the data was received but if the master PIC is sat in a time delay then the acknowledgement could be missed and so on.............

    Of course if you add RTS and CTS it overcomes most of these problems.
    My RAM is failing

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #13
    pmcleod
    Guest pmcleod's Avatar

    0 Not allowed!

    Default

    Yes that's a good point, hopefully IO have something to show how the system works, all that's needed at this stage, but I'll do that for the end result, thanks

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

       

    Similar Threads

    1. Rs232
      By metwally in forum Absolute Beginners Section
      Replies: 11
      Last Post: 15th April 2013, 13:22
    2. Which RS232 IC?
      By pic-ignorant in forum The Lounge
      Replies: 9
      Last Post: 30th August 2010, 22:36
    3. [SOLVED !] Problems using rs232
      By capiedrav in forum Proton Plus Compiler v3
      Replies: 1
      Last Post: 23rd December 2009, 00:13
    4. Rs232
      By C_Moore in forum Proton Plus Compiler v3
      Replies: 10
      Last Post: 22nd May 2006, 18:23
    5. Rs232
      By mobyuk in forum The Lounge
      Replies: 1
      Last Post: 25th September 2003, 11:08

    Members who have read this thread since 12th November 2019, 14:20 : 0

    Actions :  (Set Date)  (Clear Date)

    You do not have permission to view the list of names.

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts