ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am interfacing ADE7758 to At91sam9261 spi interface. Linux 2.6.28 is running on my custom board. Does anyone have driver for this 12-bit ADC (ADE7758) on linux ?
thank u...iam new to this forum....iam doinga project in which i have to measure currents and voltages from ADE7758..It is a energy mesuring IC...i have to interface it with at91sam9261 usin SPI protocol.the basic idea is to read the registers of ADE7758 and display them...how i have to perform this task..please give me som basic steps...
If the CPU is well supported, linux kernel certainly have a SPI driver ready for it. So just do a library of functions that open, read, write and close the SPI port to configure and get data from the adc. What to write and how to read the adc must be explained in its datasheet.
actually this ADC has several registers in it..when we give input current the value is stored in those registers and we have to send the address of that register from processor...iam not able to send the address via MOSI to device.this is a hexa format address...please any body over ther explain me...
static struct miscdevice ADE7758 = { /* creating a misc device called ADE7758 */
MISC_DYNAMIC_MINOR,
// 66,
"AdEDEV", /* NAme sets here, will be shown in /dev*/
&user_adc_file_fops
};
static int __init ADE7758_init(void)
{
int ret;
spi_register_driver(&adcDriver);
printk("\n ADC spi Driver is registered\n");
ret=misc_register(&ADE7758);
printk("\n Misc driver for ADC is registered\n");
iam trying to interface ade7758(adc) to at91sam9261...i have written a sample code which registers an spi driver and sends an address to ade7758 and receives a data...every thing is fine.My device is registered but kernel is giving a crash message....below is the message....
pl2303: Prolific PL2303 USB to serial adaptor driver
USB Serial support registered for TI USB 3410 1 port adapter
USB Serial support registered for TI USB 5052 2 port adapter
usbcore: registered new interface driver ti_usb_3410_5052
ti_usb_3410_5052: v0.9:TI USB 3410/5052 Serial Driver
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
gpio-keys: failed to configure input direction for GPIO 0, error -22
gpio-keys: probe of gpio-keys failed with error -22
ads7846 spi0.2: touchscreen, irq 29
input: ADS784x Touchscreen as /class/input/input0
i2c /dev entries driver
input: adp5588-keys as /class/input/input1
adp5588-keys 0-0034: Rev.2 keypad, irq 46
i2c-gpio i2c-gpio: using pins 39 (SDA) and 40 (SCL)
rx8025 0-0032: a power voltage drop was detected, you may have to readjust the clock
loaded driver for RX-8025 SA/NB on addr 50
**********
ADC spi Driver is registered
******************************
Misc driver for ADC is registered
***********RBuf[0]= 00TBuf[0]= 48
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.