- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
What is the device OPN?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page