gauravsharma0190
Posts: 114
Joined: Tue Oct 28, 2014 6:36 am

interfacing ADC to raspberry

Wed Jan 21, 2015 6:43 am

hello everyone
i want to interface the adc with my pi board ADC0808...
how can i programme in raspberry pi without the wiringpi.....because i programme in AVR and pic which is much differ then this programming.....like advance C language....
if anyone help me i will oblige for this
thank you.

danjperron
Posts: 3383
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: interfacing ADC to raspberry

Wed Jan 21, 2015 3:21 pm

If you want to access IO directly look at the example of Gert van Loo & Dom included in

http://elinux.org/RPi_Low-level_peripherals


More or less you need to acces the register in 32 bits mode. the macro decode which IO you want and do the read, and/or bit manipulation, and write the needed value.

Daniel

User avatar
Redrobes
Posts: 80
Joined: Mon Dec 26, 2011 9:19 pm
Location: S.W. UK
Contact: Website

Re: interfacing ADC to raspberry

Wed Jan 21, 2015 5:57 pm

I wrote a driver you can use if you dont want to go via python or the memory device.

See:
http://www.raspberrypi.org/forums/viewt ... 33&t=32152

Return to “C/C++”