problem connecting physical pin

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
ENGHK
Member++
Posts: 16
Joined: Fri Feb 19, 2010 7:03 am

problem connecting physical pin

Postby ENGHK » Fri Feb 19, 2010 8:36 am

I want to output a high voltage to a pin from my xc-2 ethernet kit .

However, I cannot detect it. Do I connect wrongly ? I connect to the X1D10.

my code is that :

# include <xs1.h>
#include <stdio.h>
#include <platform.h>
on stdcore[1]: out port outP = XS1_PORT_1C ;
on stdcore[1]: out port outClock = XS1_PORT_1D ;
on stdcore[1]: clock clk = XS1_CLKBLK_1 ;
int main ( void ) {
par
{
on stdcore[1]:
{
configure_clock_rate (clk , 100 , 8);

configure_port_clock_output ( outClock , clk );
start_clock (clk );

outP <: 1;


}}}


which pin on my xc-2 should i connect to detect the outP - XS1_PORT_1C?

I am junior in this.
User avatar
jonathan
Respected Member
Posts: 377
Joined: Thu Dec 10, 2009 6:07 pm

Postby jonathan » Fri Feb 19, 2010 10:13 am

I don't know the answer to your question, but there a "code" tag that you can use by putting:

Code: Select all

[code]
[/code]

around your code.

Like this:

Code: Select all

#include <xs1.h>
#include <stdio.h>
#include <platform.h>

on stdcore[1]: out port outP = XS1_PORT_1C ;
on stdcore[1]: out port outClock = XS1_PORT_1D ;
on stdcore[1]: clock clk = XS1_CLKBLK_1 ;

int main ( void ) {
  par
  {
    on stdcore[1]:
    {
      configure_clock_rate (clk , 100 , 8);
      configure_port_clock_output ( outClock , clk );
      start_clock (clk );
      outP <: 1;
    }
  }
}
This will preserve any code formatting and makes it easier to read.
Image
ENGHK
Member++
Posts: 16
Joined: Fri Feb 19, 2010 7:03 am

Postby ENGHK » Fri Feb 19, 2010 10:31 am

I would like to see the clock waveform from the physical pin whether it is the same as simulation.
so I don't know which pin(s) need I connect to detect it. is it right to connect X1D10 for the port_1C in core(1) ?
User avatar
paul
XCore Addict
Posts: 169
Joined: Fri Jan 08, 2010 12:13 am

Postby paul » Fri Feb 19, 2010 10:39 am

Pages 5 & 6 of the XC-2 Hardware Manual from the XC-2 page are of use here.

You should get output on pin 13 (port 1C) and 14 (port 1D) of the relevant header (1/A).

Cheers,
Paul

On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.

Who is online

Users browsing this forum: No registered users and 1 guest