Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
1082 Discussions

DE10-Standard Computer System with ARM* Cortex* A9

jey1
Beginner
294 Views

Hi,

I need to read the voltage readings of channels 0 and 1 in the DE10 Standard of ADC 0xFF204000 With C code and then translate this reading into the LED bank (0xFF200000), corresponding to GPIO pins 0-9 (0xFF200060).

How Can I do this? I am a student working on a project. Any assistance much appreciated.

 

Thanks

Shan

0 Kudos
4 Replies
jey1
Beginner
284 Views

So far, I got this..

 

#define ADDR_JP1PORT ((volatile char *) 0xFF200060)
#define ADDR_LED ((volatile char *) 0xFF200000)
#define ADDR_ADC ((volatile char *) 0xFF204000)

int main()
{
// init interface directions

int data=0;
int channel_1=0;
//int channel_2=0;


*(ADDR_JP1PORT+4) = 0xFFFFFC00; //set JP1 bit dir to input


*(ADDR_ADC) = 0; // ADC to read
//*(ADDR_ADC+4) =1;
while (1)
{
data= *(ADDR_ADC+channel_1);
data=data/12;
*(ADDR_LED) = data;
}
}

jey1
Beginner
281 Views

I got something and not confident that as supposed to be. Any assistance is very helpful. 

 

#define ADDR_JP1PORT ((volatile int *) 0xFF200060)

#define ADDR_LED     ((volatile int *) 0xFF200000)

#define ADDR_ADC     ((volatile int *) 0xFF204000)

int main()

   // init interface directions

int data=0;

int channel_1=0;

//int channel_2=0;

   *(ADDR_JP1PORT+4) = 0xFFFFFC00; //set  JP1 bit dir to input

 

  

    *(ADDR_ADC) = 0; // ADC to read

//*(ADDR_ADC+4) =1;

   while (1)

   {

   *(ADDR_JP1PORT)=*(ADDR_ADC);

   data= *(ADDR_ADC+channel_1);

   printf("Data:=%d\n",data);

   data=data/16;

   printf("Data1:=%d\n",data);

      *(ADDR_LED)  = data;

   }

}

AminT_Intel
Employee
254 Views

Hello,

 

What is the device OPN?

 

Thanks

AminT_Intel
Employee
240 Views

We do not receive any response from you to the previous question/reply/answer that I have provided. This thread will be transitioned to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you.

Reply