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.
problem connecting physical pin
-
- Member++
- Posts: 16
- Joined: Fri Feb 19, 2010 7:03 am
-
- Respected Member
- Posts: 377
- Joined: Thu Dec 10, 2009 6:07 pm
I don't know the answer to your question, but there a "code" tag that you can use by putting:
[/code]
around your code.
Like this:
This will preserve any code formatting and makes it easier to read.
Code: Select all
[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;
}
}
}
-
- Member++
- Posts: 16
- Joined: Fri Feb 19, 2010 7:03 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) ?
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) ?
-
- XCore Addict
- Posts: 169
- Joined: Fri Jan 08, 2010 12:13 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,
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.
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.