CPU clock speed, USB OTG

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
nutshell
Posts: 1
Joined: Thu Oct 09, 2014 11:29 pm

CPU clock speed, USB OTG

Post by nutshell » Thu Oct 09, 2014 11:58 pm

the board has been ordered and currently awaiting its arrival
few questions:
is it possible to have access to the CPU clock speed ?
i also read comments dating back to 2013
that OTG cannot be accessed ? has there been a work around so far ?
and finally the is it possible to use a 2 x 16 lcd screen like any microcontroller
or it only works with the LCD and touch-sensor skin ?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: CPU clock speed, USB OTG

Post by dhylands » Fri Oct 10, 2014 2:22 am

nutshell wrote:the board has been ordered and currently awaiting its arrival
few questions:
is it possible to have access to the CPU clock speed ?
You can use:

Code: Select all

>>> pyb.freq()[0]
168000000
to get the CPU frequency. With recent firmware you can also set the CPU frequency.
nutshell wrote: i also read comments dating back to 2013
that OTG cannot be accessed ? has there been a work around so far ?
I'm not sure about OTG.
nutshell wrote: and finally the is it possible to use a 2 x 16 lcd screen like any microcontroller
or it only works with the LCD and touch-sensor skin ?
There is some code over here: https://github.com/dhylands/python_lcd/tree/master/lcd (for GPIO and I2C variants). The I2C variant is for a particular I2C chip, but it should be fairly easy to adapt to other chips.
See this thread: http://forum.micropython.org/viewtopic. ... &hilit=LCD

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: CPU clock speed, USB OTG

Post by pythoncoder » Fri Oct 10, 2014 8:31 am

My multi threaded library includes support for HD4480 displays wired using a four wire data bus (rather than serial or I2C). If the thread support isn't needed it would be easy to adapt the code for the LCD driver.

https://github.com/peterhinch/Micropython-scheduler

Regards, Pete
Peter Hinch
Index to my micropython libraries.

Post Reply