problem connecting physical pin

Technical questions regarding the XTC tools and programming with XMOS.
ENGHK
Member++
Posts: 16
Joined: Fri Feb 19, 2010 7:03 am

problem connecting physical pin

Post by ENGHK »

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

Post by jonathan »

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

Post by ENGHK »

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

Post by paul »

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.