Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Manager
863 Views

Accurate pulse generation

Jump to solution

Hello,

can someone provide some information on how to generate accurate pulses (about 1usec resolution)?

The application is to program the AD8556ACPZ gains/offset using a GPIO output.

I have started with this info:

http://www.i-programmer.info/programming/hardware/8784-exploring-edison-almost-real-time-linux.html?... http://www.i-programmer.info/programming/hardware/8784-exploring-edison-almost-real-time-linux.html?...

Ideally I would like to have it implemented with Python.

Here are some issues:

- Setting the Linux scheduler to FIFO mode is not supported with Python versions earlier than 3.x

- Python 3.x seems to need some work to make it work well with MRAA (assuming it can be upgraded to 3.x)

- To generate a software controlled pulse requires a usec delay, in Linux that might not be achievable

- How about the MCU part of the Edison? Can it be accessed using Python? Can it be easily configured for such task?

Any pointers would be greatly appreciated.

Thanks.

Tags (1)

Accepted Solutions
Highlighted
Community Manager
30 Views

Hello nelfata,

 

 

I was able to create a script that reached pulses of about 1us or 0.5us based on the example found in https://github.com/intel-iot-devkit/mraa/blob/master/examples/python/cycle-pwm3.py mraa/cycle-pwm3.py at master · intel-iot-devkit/mraa · GitHub, in fact here's a screenshot of my logic analyzer getting a pulse of 1us.

 

 

Regarding your other issues, you will be able to get Python 3.3 from http://alextgalileo.altervista.org/edison-package-repo-configuration-instructions.html AlexT's repo. According to http://iotdk.intel.com/docs/master/mraa/python/example.html mraa v0.9.6 documentation the mraa module can be built for Python 3, so you should be able to use it as long as you http://iotdk.intel.com/docs/master/mraa/building.html build it manually.

 

If you are interested in using the MCU, indeed it has access to Edison's PWM interface. However, you will not be able to use the MCU with Python as it only works with C/C++. In case you are interested in using the MCU, you should follow https://software.intel.com/en-us/creating-applications-with-mcu-sdk-for-intel-edison-board this guide.

 

 

Peter.

View solution in original post

0 Kudos
2 Replies
Highlighted
Community Manager
31 Views

Hello nelfata,

 

 

I was able to create a script that reached pulses of about 1us or 0.5us based on the example found in https://github.com/intel-iot-devkit/mraa/blob/master/examples/python/cycle-pwm3.py mraa/cycle-pwm3.py at master · intel-iot-devkit/mraa · GitHub, in fact here's a screenshot of my logic analyzer getting a pulse of 1us.

 

 

Regarding your other issues, you will be able to get Python 3.3 from http://alextgalileo.altervista.org/edison-package-repo-configuration-instructions.html AlexT's repo. According to http://iotdk.intel.com/docs/master/mraa/python/example.html mraa v0.9.6 documentation the mraa module can be built for Python 3, so you should be able to use it as long as you http://iotdk.intel.com/docs/master/mraa/building.html build it manually.

 

If you are interested in using the MCU, indeed it has access to Edison's PWM interface. However, you will not be able to use the MCU with Python as it only works with C/C++. In case you are interested in using the MCU, you should follow https://software.intel.com/en-us/creating-applications-with-mcu-sdk-for-intel-edison-board this guide.

 

 

Peter.

View solution in original post

0 Kudos
Highlighted
Community Manager
30 Views

Peter,

thank you for you prompt reply. I will give it a try.