Search found 13 matches

by scardig
Wed May 02, 2018 5:51 pm
Forum: The MicroPython pyboard
Topic: Advices for "mission-critical" applications
Replies: 4
Views: 339

Re: Advices for "mission-critical" applications

I think you need to clarify what you mean by "dangerous situations". If you mean danger to life and limb (fire, electrocution and suchlike) you need much more specialist advice, both technical and legal, than you are likely to receive in this forum. Even if the only risk is of (say) burning out a m...
by scardig
Tue May 01, 2018 2:24 pm
Forum: The MicroPython pyboard
Topic: Advices for "mission-critical" applications
Replies: 4
Views: 339

Advices for "mission-critical" applications

Ok, maybe "mission-critical" is a bit exagerated but I refer to real world applications where a failing control unit may lead to a damage to the system. As an example: if at some point in time my main script will crash it will leave the pyboard in the last state (ie timers go on, outputs will remain...
by scardig
Mon Apr 23, 2018 10:06 am
Forum: The MicroPython pyboard
Topic: Interrupt and ADC
Replies: 3
Views: 283

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...
by scardig
Mon Apr 23, 2018 8:33 am
Forum: The MicroPython pyboard
Topic: Interrupt and ADC
Replies: 3
Views: 283

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 ...
by scardig
Mon Feb 05, 2018 4:17 pm
Forum: The MicroPython pyboard
Topic: Pyboard debugging while embedded: powering
Replies: 3
Views: 274

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 ...
by scardig
Mon Feb 05, 2018 3:34 pm
Forum: The MicroPython pyboard
Topic: Pyboard debugging while embedded: powering
Replies: 3
Views: 274

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...
by scardig
Fri Jan 26, 2018 10:27 am
Forum: The MicroPython pyboard
Topic: Infrared communications between 2 Pyboard
Replies: 6
Views: 2912

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...
by scardig
Thu Jan 25, 2018 9:41 am
Forum: The MicroPython pyboard
Topic: Infrared communications between 2 Pyboard
Replies: 6
Views: 2912

Re: Infrared communications between 2 Pyboard

pythoncoder wrote:
Tue Jan 23, 2018 5:16 pm
The Pyboard can do that using one of the onboard timers.
So, for example:

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
by scardig
Tue Jan 23, 2018 3:56 pm
Forum: The MicroPython pyboard
Topic: Infrared communications between 2 Pyboard
Replies: 6
Views: 2912

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...
by scardig
Thu Jan 11, 2018 10:43 am
Forum: The MicroPython pyboard
Topic: Info about Pyboard v1.1 I/O
Replies: 7
Views: 682

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...