Xcore-200 explorerkit PWM Generation

New to XMOS and XCore? Get started here.
Post Reply
Schatz143
Member++
Posts: 31
Joined: Mon Jan 20, 2020 9:54 am

Xcore-200 explorerkit PWM Generation

Post by Schatz143 »

Hi there!Good day
I am a new here.
I have Xcore-200 explorer kit.
1)I would like to generate 5KHz-10KHz PWM signal with a certain dutycycle(60% to 80%) with a 5V source
2)I would like to connect an external oscilloscope to check

Where can i find information on PWM generation using XTimecomposer 14.3.2 on Xcore 200 explorerkit?
and whats the best way to generate a PWM Signal overall?
Any corrections needed in my request will be corrected.
This is just to learn basics in XMOS using XTimecomposer.Your help would be much appreciated.
Greetings!


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hello and welcome.

1) The XMOS CPUs are 3v3 swing on the I/O. For this reason, for your 5v0 swing, you will need to apply external level shifters (mosfet based or digital isolators from TI / Silabs / NVE) to shift from 3v3 to 5v0. We have used TI and Silabs parts with success.

If you do use mosfet / FET based level shifters, do not drive long traces and most definitely do not use for wired connections - such parts just do not offer the proper drive strength!

https://hackaday.com/2016/12/05/taking- ... -shifters/

You will have to review the level shifting speed with respect to your project. See here:

https://raspberrypi.stackexchange.com/q ... -corrupted

https://forums.adafruit.com/viewtopic.php?f=8&t=38358
The 10K's do make the interface a little more sluggish than using a TXB0108 or 74LVC245 so we suggest checking those out if you need high-speed transfer.
Review your target device and specifically the logic HIGH value. It is possible that the XMOS CPU can direct drive your target but where possible, consider isolation between the CPU and such target loads.

2) The PWM examples and docs can be found here:

https://github.com/xcore/sc_pwm

Docs:

https://github.com/xcore/sc_pwm/blob/ma ... ummary.rst
Schatz143
Member++
Posts: 31
Joined: Mon Jan 20, 2020 9:54 am

Post by Schatz143 »

Hallo !
Thanks for the detail information.
The goal is to create a current controlling loop for the Target (Would be simple potentiometer ).
Inorder to do that
1)Generate a PWM signal on two or more cores paralelly (should be given to other elements like ADC ).

After that whats the best way to move forward to create a current controling loop for Potentiometer.Is there any kind of similar projects avaialable on Xtime composer to learn?
Would be appreciated if some help in this direction.

By the way ,Thanks for sharing those links ,i will have a look into it.
Post Reply