xCORE-200 eXplorer troubles Topic is solved

If you have a simple question and just want an answer.
atonyb
Newbie
Posts: 1
Joined: Mon Aug 03, 2015 4:46 pm

xCORE-200 eXplorer troubles

Post by atonyb »

Hi Guys,

I've just received my eXplorer kit and I'm in the process of learning how to program for XMOS devices.

I've just downloaded the GPIO demo to test the board and I can't seem to get it to work properly.

The problem I have is that the switches SW1 and SW2 dont output anything in excess of 2.63 volts, suggesting that there is a ~40k ohm load on the output of the switch. I have inserted printstrln("") statements in various places to get a readout on what is going on and the device only seems to be reading 0 on each pin.

Could the pulldown resistors in the xCORE-200 still be active for those GPIO lines? Or maybe the board is stick in reset?

I've managed to run the hello world project and this GPIO project and they load and execute just fine, it's only this GPIO problem.

Does anyone have any suggestions? Any pointers appreciated!

 

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

Post by mon2 »

Hi atonyb.

 

======== Updated comments =====

Which GPIO project have you tested ?

Please test this version which is specific to the xCORE-200 kit:

http://www.xcore.com/projects/xcore-200 ... emo-webapp

===========================

Don't have direct access to our xCORE-200 kit at this moment but the referenced SW1 & SW2 pushbutton switches are wired with 10K pull-ups to +3.3 volts and respectively the other side of each switch to ground. This should result in a default pull-up to +3.3 volts or 0 volts if the respective pushbutton is pressed.

Would you confirm the voltage present on the SW1 & SW2 switches follow these actions ?

You should see +3.3 volts if the switches are open (not pressed) and 0 volts if pressed.

Is it possible that you have programmed the mating XMOS pins to be output pins ?

Check your coding for the access to port pins X0D26 & X0D27 to be sure they remain in INPUT mode. Then apply a volt meter onto the respective push-buttons for testing.

================

Noting the internal pull-downs on the same X0D26 & X0D27 pins, it appears that a voltage divider will be created at the switch junctions due to the external pull-ups. However, from my possibly fading memory, I do recall that the sample code for the kit worked fine when pressing the respective push buttons. Can confirm this once I have access to the kit in the lab.

The internal pull-downs are weak values of 35K typical (from respective datasheet) as compared to the external 10K pull-ups.

Using the following voltage divider calculator with Vin = 3.3 volts, R1 = 10000 ohms, R2 = 35000 ohms then Vout = 2.567 volts.

http://www.raltron.com/cust/tools/voltage_divider.asp

The minimum voltage of a high logic level for the cmos pins on the XMOS is 2.0 volts so you should be able read a "1" when the pushbutton is not pressed and "0" when the pushbutton is closed / pressed (since you are pulling down the pin hard to ground).

 



 

The default power up condition is for the port pin to have the pull-down enabled. Consider to use the following call to DISABLE the pull-down.

** sorry - this may not be suitable as it places the port pin into drive mode **. The Vin > 2.0 volts is fine to consider as a high so should be ok as-is.



 

 

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

Post by mon2 »

Hi atonyb. Created this document with full details on how to build the GPIO project on xTimeComposer 14.0.2 toolchain.

This build procedure has been confirmed against our XCORE-200 Explorer kit which is working fine using the same SW1 & SW2 pushbuttons: