Search found 21 matches
- Mon Apr 23, 2018 10:06 am
- Forum: MicroPython pyboard
- Topic: Interrupt and ADC
- Replies: 3
- Views: 3289
Re: Interrupt and ADC
It looks OK, but it won't terminate because there's no exit from the while True loop. You might want to look at the ADC.read_timed_multi in the latest firmware which provides a means of reading multiple ADC's in response to a timer tick. This might offer smaller code. Thanx. Two questions: 1. Since...
- Mon Apr 23, 2018 8:33 am
- Forum: MicroPython pyboard
- Topic: Interrupt and ADC
- Replies: 3
- Views: 3289
Interrupt and ADC
Hello, here is a code snippet to achieve the following: 1. Read 10 digital values on X1,X2,X3,X4,X5,X6 at 5 Hz 2. Perform a "calculation" on such values 3. goto 1 Do you find it correct ? import array import utime, time import micropython micropython.alloc_emergency_exception_buf(100) NSAMPLES = 10 ...
- Mon Feb 05, 2018 4:17 pm
- Forum: MicroPython pyboard
- Topic: Pyboard debugging while embedded: powering
- Replies: 3
- Views: 2425
Re: Pyboard debugging while embedded: powering
If you had a USB->UART module like a CP2102 or FTDI, isn't it possible just to connect common GND and RX/TX? Then you can monitor without having to wire through the Micro USB port (and therefore avoid automatically joining V+ to your laptop). You're right but I will "waste" two pins on the pyboard ...
- Mon Feb 05, 2018 3:34 pm
- Forum: MicroPython pyboard
- Topic: Pyboard debugging while embedded: powering
- Replies: 3
- Views: 2425
Pyboard debugging while embedded: powering
Hello, we have to embed a pyboard into a dedicated board that will feed power to the V+,GND pins of the Pyboard. With the Pyboard powered in such way, I may need to hot-connect via USB to see what's going on from my PC via Putty (and eventually update my Python code) then reset and hot-disconnect wh...
- Fri Jan 26, 2018 10:27 am
- Forum: MicroPython pyboard
- Topic: Infrared communications between 2 Pyboard
- Replies: 6
- Views: 6447
Re: Infrared communications between 2 Pyboard
I think that's right. ok. In the docs I read: "Each channel can be configured to perform pwm, output compare, or input capture. All channels share the same underlying timer, which means that they share the same timer clock." So may I use UART2 on (X3,X4) and, at the same time, generate a PWM at 153...
- Thu Jan 25, 2018 9:41 am
- Forum: MicroPython pyboard
- Topic: Infrared communications between 2 Pyboard
- Replies: 6
- Views: 6447
Re: Infrared communications between 2 Pyboard
So, for example:pythoncoder wrote: ↑Tue Jan 23, 2018 5:16 pmThe Pyboard can do that using one of the onboard timers.
from pyb import Pin, Timer
p = Pin('X1')
tim = Timer(2, freq=153600)
ch = tim.channel(1, Timer.PWM, pin=p)
It results in:
>>> tim.freq()
153846.2
Am I on the right way ?
Thanx
Thanx
- Tue Jan 23, 2018 3:56 pm
- Forum: MicroPython pyboard
- Topic: Infrared communications between 2 Pyboard
- Replies: 6
- Views: 6447
Infrared communications between 2 Pyboard
Hello, We are asked to develope an infrared data link between 2 Pyboard and we think of using a Microchip MCP2122 + TFDU4101 as a solution. As per MCP2122 datasheet the baud rate is determined by the frequency of a 16XCLK signal such that, for a baudrate of 9600 bps, we need to feed the MCP2122 with...
- Thu Jan 11, 2018 10:43 am
- Forum: MicroPython pyboard
- Topic: Info about Pyboard v1.1 I/O
- Replies: 7
- Views: 4639
Re: Info about Pyboard v1.1 I/O
So, for example, would it be possible to use X1 X2 for UART, X3 as GPIO, X4 as GPIO, X5 as DAC , X6 as GPIO and X7 as ADC ? (to know if I can mix pins used for their special function and used as GPIOs even when they are placed in different columns in the drawing) Both look fine to me. All pins on th...
- Thu Jan 11, 2018 9:11 am
- Forum: MicroPython pyboard
- Topic: Info about Pyboard v1.1 I/O
- Replies: 7
- Views: 4639
Re: Info about Pyboard v1.1 I/O
Hello Peter,
thanx for the answer. Can you give me an opinion related to the pin configuration in the above post (CASE 1 and CASE 2) ?
thanx for the answer. Can you give me an opinion related to the pin configuration in the above post (CASE 1 and CASE 2) ?
pythoncoder wrote: ↑Thu Jan 11, 2018 5:44 amPins for hardware flow control are in the docs. I have successfully used this feature via the pyb library.
- Wed Jan 10, 2018 4:56 pm
- Forum: MicroPython pyboard
- Topic: Info about Pyboard v1.1 I/O
- Replies: 7
- Views: 4639
Re: Info about Pyboard v1.1 I/O
Thanx for the answer. Based on the above requisites, do you think that the following pin configuration is a viable choice: CASE 1 ===== 1x UART: Y9, Y10 (+ flow control Y6, Y7) 6x digital input: Y8, X9, X10, Y1, Y2, Y3 CASE 2 ===== 1x ADC : X1 1x UART: Y9, Y10 (+ flow control Y6, Y7) 3x digital inpu...