Author Topic: [SOLVED] UART console example not working on mcMod120  (Read 306 times)

rudydevolder

  • Newbie
  • *
  • Posts: 26
  • Belgian guy married Phillipina
  • Location: Philippines
    • View Profile
Re: UART console example not working on mcMod120
« on: August 03, 2017, 03:19:24 am »
I got it working now, but only after finding that there must be a mistake in either the Dev Board or the documentation:
In the docs is stated:
16.39. Uart Class Inherits Object:    Public Sub Create(baudRate As Integer, tx As Pin, rx As Pin)
But I found that Rx comes first and then Tx.
So this works fine: ser = Uart.Create(9600, Pin.Pin1, Pin.Pin0) // Pin 1 to Rxd and pin 0 to TxD; Dev-Board default jumper config  ;D
Also something not working like it should:
ser.Write("Hello") ser.Write(0x0c) ser.Write(0x0a)    ??? this seems to give a newline but no line feed, so my line is overwritten in Putty and disappears, I found out after putting in a loop for 50 times.
when I do the following:
ser.Write("Hello") ser.Write(13) ser.Write(10)   :)    it works, how comes?