Shop OBEX P1 Docs P2 Docs Learn Events
About FullDuplexSerialPlus-object — Parallax Forums

About FullDuplexSerialPlus-object

caskazcaskaz Posts: 957
edited 2009-12-27 03:39 in Propeller 1
Hello Guys.

I have question about FullDuplexSerialPlus-object.
I write code( LED blink ) included FullDuplexSerialPlus-object. And loaded it to RAM, it operated it.

But I loaded it eeprom, and I removed Demo-board from PC.
After reset, LED don't blink.
When Demo-board connected to PC again, LED blink and PST received data.

Why its code not operate when disconnected PC?

Comments

  • SamMishalSamMishal Posts: 468
    edited 2009-12-25 14:59
    Caskaz,

    If you are receiving data from the PST and the Demo board is not connected then the
    FullDuplex serial will wait for ever for input to come and since you are not connected then
    it won't come and the Propeller will appear to be hung.



    Also if you are sending then of course if you are not connected then there will be no
    sending happening.



    If you post your code we can get a better idea and thus be able to have a more informed
    opinion as to what is going wrong.

    Samuel
  • caskazcaskaz Posts: 957
    edited 2009-12-26 01:03
    Hi.

    Code is below:
    CON
       _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    OBJ
      debug : "FullDuplexSerialPlus"
    PUB main | n
      debug.Start(31, 30, 0, 57600)
      debug.str(string("start:"))
    
      dira[noparse][[/noparse]16]~~
        repeat
          !outa[noparse][[/noparse]16]
          debug.dec(n)
          ++n
          waitcnt(clkfreq/2 + cnt)
    
    




    I changed code below:
    CON
       _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    OBJ
      debug : "FullDuplexSerialPlus"
    PUB main | n
      debug.Start(31, 30, 0, 57600)
      'debug.str(string("start:"))
    
      dira[noparse][[/noparse]16]~~
        repeat
          !outa[noparse][[/noparse]16]
          'debug.dec(n)
          '++n
          waitcnt(clkfreq/2 + cnt)
    
    



    LED is blinking connecting PC. But LED is not blinking after disconnecting PC and reset.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-12-26 02:04
    You didn't say what hardware you are using as it sounds like a hardware problem.
    Have a look at this thread http://forums.parallax.com/showthread.php?p=847290

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • caskazcaskaz Posts: 957
    edited 2009-12-26 02:32
    Thanks.
    I use Demo-board(Item code 32100)
    I also tried same code on proto-board(Item code 32212).
    Disconnected PC, LED is not blinking.
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-12-26 06:57
    Hello Caskaz,

    I tested your code on my PPDB and it works just fine with and without conection to the PC

    You mentioned that you loaded the code to RAM

    If you DISconnect from the PC this might cause a reset on the propeller which makes the prop boot from the EEPROM
    then your program in RAM is gone

    Try and load your original code to the EEPROM and test again

    The EEPROM has 100.000 writecycles this means:
    If you work with the prop ALL days 9 hours per day loading a new codeversion EVERY 2 Minutes (30 times in 60 minutes) into the EEPROM

    100000 / 9 / 30 = 370

    The endurance of the EEPROM is more than one year. Now imagine what is realistic about working with the prop and how often
    you load new code into the EEPROM.

    best regards

    Stefan
  • caskazcaskaz Posts: 957
    edited 2009-12-26 08:25
    I loded code to eeprom.

    My demo-board and proto-board operate well to load another code on eeprom.
    But code inculded FullDeplexSerialPlus does not operate.

    I use Windows Vista (localized Japanese) on Dell.
    Propeller-Tool has many problem in Windows Vista (localized Japanese) on Dell.

    This may be only Japanese OS's problem.

    Post Edited (caskaz) : 12/26/2009 8:30:57 AM GMT
  • SamMishalSamMishal Posts: 468
    edited 2009-12-26 10:50
    Caskaz

    CON
       _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    OBJ
      debug : "FullDuplexSerialPlus"
    PUB main | n
      debug.Start(31, 30, 0, 57600)
      debug.str(string("start:"))
    
      dira[noparse][[/noparse]16]~~
        repeat
          !outa[noparse][[/noparse]16]
          debug.dec(n)
          ++n
          waitcnt(clkfreq/2 + cnt)
    
    

    I loaded the above code you gave into EEPROM (F11) and then turned the·PDB off and disconnected it
    and then turned the PDB back on and the LED blinked perfectly.

    I then turned the PDB off again and connected it to the PC and then started the PST and then turned the
    PDB on again and I had the LED blinking perfectly and the PST showed the word "start" and then the numbers
    012345.....·just as expected.

    Conclusion.....there is nothing wrong with the program.......and it works just the same Connected and Disconnected
    from the PC.

    Of course....I am sure you know....that when it is disconnected form the PC it won't be able to send data to the PC.

    I cannot see what is the problem.....the only thing I can think of is that you are disconnecting from the PC while
    the PDB is still on.....this may cause some NOISE that makes the propeller jitter or something. But even then
    that is not a problem on my PDB...I tried it....it just continued to work by blinking the LED......


    Maybe there is something wrong with your PDB...... Japanese Vista or any other Vista would not be an issue
    especially if you are not even connected to the PC.


    Regards

    Samuel
    ·
  • SamMishalSamMishal Posts: 468
    edited 2009-12-26 10:55
    Caskaz,

    I just had a thought.....maybe·while you are disconnecting the PDB you are somehow also
    interrupting the power supply.....check that the PDB is still getting power....



    I suggest that after you program the EEPROM that you turn the PDB off....disconnect from
    the PC....then turn back on.....watch the Green Power LED make sure it is on.



    The program you gave with the Serial stuff still it works perfectly as intended with the PDB
    connected to the PC and works still perfectly also unconnected from the PC but of course
    only the LED will be blinking and no serial output is observable since it is not connected.

    Samuel




    Post Edited (SamMishal) : 12/26/2009 12:27:40 PM GMT
  • caskazcaskaz Posts: 957
    edited 2009-12-26 11:28
    Thanks advices.

    I install WindowsXP(for Japanese) to remove Linux on another PC.
    And I tried same code. I loaded to eeprom. and disconneced PC.
    It's fine operating.

    Propeller Tool has a many problem on WindowsVista(for Japanese).
    There may be only Dell-note(for Japanese).
  • caskazcaskaz Posts: 957
    edited 2009-12-27 02:08
    Hi, Guys.

    I was mistake.
    Vista and XP (for Japanese) may not be trouble's cause. I have no idea.
    This morning, I have same trouble to try again.
    I found out Propeller is resetted.

    I write to eeprom on protoboard(Item code 32212) and schmartboard(Item code 27150).
    Both need Prop-Plug(Item code 32201).

    I power on to remove Prop-Plug.
    It fine operate.

    But connected Prop-Plug, I seem that they are resetted constantly. (it seem that reset-timing is affected at temperature )

    Demo-board has FTDI inside board, therfore Demo-board never operate code(debug.dec(n)) .
    another object is OK. example tv-text, mx2125, lcd,etc

    My trouble is rare case? Only Windows(for Japanese)?
    Please teach me its cause.
  • kuronekokuroneko Posts: 3,623
    edited 2009-12-27 03:10
    caskaz said...
    Demo-board has FTDI inside board, therfore Demo-board never operate code(debug.dec(n)) .

    My trouble is rare case? Only Windows(for Japanese)?
    No, it has nothing to do with the OS you're using (why would it, it's not even connected). Did you read and understand the thread Peter was pointing at (4th posting in this thread)?
  • caskazcaskaz Posts: 957
    edited 2009-12-27 03:39
    Sorry, I miss to read.

    Thanks.
Sign In or Register to comment.