Announcement

Collapse
No announcement yet.

uLCD-32PTU resets using file_CallFunction

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • uLCD-32PTU resets using file_CallFunction

    I'm experimenting with sending Serial Commands from a Parallax Propeller.I'm using the Serial Command Reference Manual (Rev 2.0) as a guide, and the 4FN-Prog.4FN file found on page 120 as a test file.

    The issue seems to be related to the pause(3000); function in the 4FN file.

    If I comment out pause(3000) line in the 4FN file, my function works and I get the expected result. I get "I have returned" with the Read String command. However, ...

    With the pause(3000) line active, my display resets. Initially I suspected a Time Out issue. I've implemented a Time Out of 10 seconds, and during the break, the display resets.

    I put a 'scope to TX and RX and can confirm no signals are going there to trigger a reset.

    Any ideas?

    SOLVED: The issue seems to be related to a hardware reset of the display. By eliminating the hardware reset in my program, or by pausing for 5 seconds rather than 3 seconds, the file_CallFunction call worked as expected.
    Last edited by TomLewis; 13th February 2018, 07:22 AM. Reason: Edited to summarize the solution so future readers don't need to read 30 posts!

  • #2
    Nothing immediately springs to mind.

    Can you provide the actual program source, and a Serial Commander log showing how to recreate the issue?

    Then we should be able to recreate it and work out what's wrong
    Mark

    Comment


    • #3
      Thanks for looking into this for me.

      I'm not familiar with Fat Controller. I see 4D used to have one but it's deemed legacy now. What do you recommend as an alternative?

      The c source file has the txt extension to satisfy the uploader. The file name "sampleP.4fn" has the pause(3000) line.

      I tried to upload the two 4FN files that I use as test subjects but the uploader doesn't like that. Is there a work around? The only difference is one has the pause(3000) line and the other doesn't.
      Attached Files

      Comment


      • #4
        Gee, sorry That should have been Serial Commander
        Mark

        Comment


        • #5
          Here are the Serial Commander logs you requested. They don't show any error.

          sampleNP.4fn = no pause(3000);

          sampleP.4fn = contains pause(3000); line

          But of course they aren't driven at the same speed as the Propeller, nor are they using my functions.

          Here are the screen captures from the scope.
          SampleNP shows TX and RX activity about 10 seconds after CallFunction.

          Click image for larger version

Name:	samplenp.png
Views:	1
Size:	18.4 KB
ID:	61804

          SampleP doesn't show any activity after CallFunction and the display has completed the reset sequence before the compiler's terminal prints ' ... and end.'

          Click image for larger version

Name:	samplep.png
Views:	1
Size:	18.2 KB
ID:	61805

          What else can I try?

          Comment


          • #6
            Those logs are broken links.
            Mark

            Comment


            • #7
              What do you mean by that?

              Comment


              • #8
                The serial commander logs are 'broken links', see your previous post
                Mark

                Comment


                • #9
                  What do you mean they are broken links? Do you not see the images that I see? Or do you mean something else?

                  Comment


                  • #10
                    I see this
                    Attached Files
                    Mark

                    Comment


                    • #11
                      This is what I see...

                      Click image for larger version

Name:	Forum capture.JPG
Views:	1
Size:	100.8 KB
ID:	61815

                      Are the scope images broken too?

                      Comment


                      • #12
                        No the scope ones are fine.

                        Hmm, are you sure there's not something odd with the propeller code?

                        What is the real difference between what the Serial commander does and what your code does?

                        Can you check the hex in both directions?

                        You can easily see the 3 second delay, 0.044 sec vs 3.046 secs
                        Mark

                        Comment


                        • #13
                          Hi TomLewis,
                          How are you attaching your images?
                          Looking at your post, I see what Mark is seeing, however your last reply with "This is what I see..." I can see the image.
                          Are you clicking on the A at the top right of the editor, and inserting an image using the Image button, and then uploading it from your PC? or something else?
                          Very curious, as I have never seen codes like what your post has generated, before.
                          James

                          Comment


                          • #14
                            James, I selected the 'Upload Attachments' icon on the top right of the reply area. Click image for larger version

Name:	Attachments icon.PNG
Views:	1
Size:	3.3 KB
ID:	61855

                            I remember that there was a timeout issue with that post and I had to upload the images a second time.

                            Interestingly, I still see all the image on post #5, even though my computer has been off for a while.

                            Mark, I'll get back to you in a bit.

                            Comment


                            • #15
                              Mark, I think the Propeller code is good because:
                              1) The function is called and it executes up to the pause(3000) command, then resets, and
                              2) When there is no pause command in the 4FN file, everything works as expected.

                              The difference between Propeller code and Serial Commander is:
                              1) Speed of execution, and
                              2) My functions versus 4D functions.

                              The only thing in common are the sampleP.4FN and sampleNP.4FN files.

                              I'll see if I can decode the hex on TX / RX.

                              Comment

                              Working...
                              X