Shop OBEX P1 Docs P2 Docs Learn Events
Try to do this — Parallax Forums

Try to do this

hooktxuhooktxu Posts: 33
edited 2009-04-22 13:49 in Propeller 1
Can anyone try this program? It's just to test the serial port. I connect the serial port to MAX3232 and this MAX to propeller

CON

_xinfreq = 5_000_000
_clkmode = xtal1 | pll16x

OBJ
debug : "FullDuplexSerialPlus"

PUB main

debug.Start(0, 1, 0, 9600)

repeat
waitcnt(clkfreq*20 + cnt)
debug.str(string("Hello World!"))

Post Edited (hooktxu) : 4/22/2009 9:24:28 AM GMT

Comments

  • AleAle Posts: 2,363
    edited 2009-04-22 09:16
    Change the subject with the pencil on the top-right corner.

    It does work smile.gif.

    I just changed the pins to 31 RX and 30 Tx (normal prop-plug) and used FullDuplexSerial because I do not have the other one smile.gif

    Edit: After the repeat you should have a minimum of 1 space indent:

    repeat
      waitcnt(...
      debug....
    
    
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-04-22 09:21
    Why should we try it? It has to work on your setup.

    So, you attached the MAX to pins 0 and 1? Are you sure you did not mix up the RX and TX connection between MAX and PROP? Or maybe MAX and PC or whatever is connected there?

    I assume that the indentation has been lost because you did not use the "Insert Formatted Code".
    repeat
      waitcnt( clkfreq*20 + cnt )
      debug.str( .... )
    

    If that's the case everything looks fine.

    Just a sidenote: be aware of the maximum factor you can multiply the clkfreq with. It's 53. If you go beyond that, your program won't wait as long as you'd expect.
  • hooktxuhooktxu Posts: 33
    edited 2009-04-22 09:28
    I do not leave anything in the HyperTerminal
  • hooktxuhooktxu Posts: 33
    edited 2009-04-22 09:32
    Is it possible to have bad connections?
    31(prop)-->11(max)
    30(prop)-->12(max)

    13(max)-->3(rs232)
    14(max)-->2(rs232)
  • AleAle Posts: 2,363
    edited 2009-04-22 09:36
    hooktxu:

    El programa funciona. Pod
  • hooktxuhooktxu Posts: 33
    edited 2009-04-22 09:40
    he utilizado un max3232. para conectarlo utilizo un puerto serie. es necesario usar el 232?
    Gracias por el espa
  • hooktxuhooktxu Posts: 33
    edited 2009-04-22 09:47
    he cambiado lo que me has dicho y he puesto el max 232, pero ni aun asi. de todas formas para cargar la RAM no me localiza el com si tengo el plugin puesto y las conexiones de max.
  • AleAle Posts: 2,363
    edited 2009-04-22 09:50
    De nuevo, porqu
  • hooktxuhooktxu Posts: 33
    edited 2009-04-22 09:55
    t estoy mareando, ya lo siento. se que necesito el max, pero estoy usando el 3232, en vez de 232. necesito otro puerto serie, por eso utilizo el rs232. tengo k onfigurar alfgo en el hyperterminal?? es que ya no se...
  • AleAle Posts: 2,363
    edited 2009-04-22 12:35
    Aca esta el circuito que yo usar
    1236 x 514 - 13K
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-04-22 13:34
    You could test the MAX - PC connection by removing the propeller connections and link T2IN with R1OUT. If you then type something in hyperterminal it should be echoed.
    If this does not work there is something wrong with the PC-MAX connection.

    If this works - did you try it with a wrong setup before? Maybe you fried a pin of the propeller?

    Unfortunately you switched language. Otherwise I bet a lot·more members could throw in some ideas or experiences.
  • hooktxuhooktxu Posts: 33
    edited 2009-04-22 13:49
    Thank You! Gracias! Eskerrik asko!
Sign In or Register to comment.