Search found 176 matches

by marfis
Fri Nov 28, 2014 4:39 pm
Forum: Development of MicroPython
Topic: Bytearray support
Replies: 3
Views: 3584

Bytearray support

Not sure if this has been brought up already but: >>> a bytearray(b'\x01\x02') >>> b bytearray(b'\x01\x02') >>> a+b Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand types for binary operator: 'bytearray', 'bytearray' The help page of micropython's...
by marfis
Thu Nov 06, 2014 9:49 pm
Forum: General Discussion and Questions
Topic: Uart.read(x) returns always one byte
Replies: 2
Views: 1780

Re: Uart.read(x) returns always one byte

Ah well... I should have guessed something like that. I did see the timeout_char option but haven't thought of it as the solution.

Thanks for the clarification.
by marfis
Wed Nov 05, 2014 8:50 pm
Forum: General Discussion and Questions
Topic: Uart.read(x) returns always one byte
Replies: 2
Views: 1780

Uart.read(x) returns always one byte

I'm using the UART in 9600,8,E,1 mode. With the latest updates, everything runs fine with the parity and bit settings. So far so good. However... I was running into another issue that somebody might clarify / explain. So I'm basically doing: self.serial = UART(port) self.serial.init(9600, bits=8, pa...
by marfis
Sun Nov 02, 2014 11:02 am
Forum: Development of MicroPython
Topic: Uart word-size and parity
Replies: 6
Views: 3369

Re: Uart word-size and parity

This enables RTS and CTS, and you need to hook up the X2 and X1 lines respectively That sounds pretty good. Is there any other functionality that you would need for RTS/CTS? Unfortunately I messed it up - for msp430-python-tools to work "out of the box" RTS and DTR lines are used to drive the RST/T...
by marfis
Sat Nov 01, 2014 7:05 pm
Forum: Development of MicroPython
Topic: Uart word-size and parity
Replies: 6
Views: 3369

Re: Uart word-size and parity

Thanks for the fast fix. Appreciate it! I'm aiming to use the pyboard as a standalone programmer board for MSP430 devices. The SD card holds the firmware file(s) and pressing the button would start the download to the target device. Such a programmer would work on any OS. Or it might even be used wi...
by marfis
Fri Oct 31, 2014 10:57 am
Forum: Development of MicroPython
Topic: Uart word-size and parity
Replies: 6
Views: 3369

Uart word-size and parity

Hi I am using the uart module with 8bit data, even parity, 1 stop bit. (using the uPy Board as a bootrap loading device for MSP430 uPs). Initalisation is as follows: uart = pyb.UART(4) uart.init(9600, bits=8, parity = 0) txdata = struct.pack('<BBB', 0x81, 0xaa,0x80) uart.write(txdata) uart.write suc...