chipKIT hardware documentation

stefan646
Posts: 8
Joined: Fri Dec 16, 2011 11:08 am

Re: chipKIT hardware documentation

Post by stefan646 » Tue Feb 07, 2012 8:13 am

I have a question about MAX32 : if I want to read a analog signal (from a sound card) using the MAX32 ADC should I use a buffer before the ADC ?

User avatar
Saggitarius
Posts: 4
Joined: Fri Feb 03, 2012 9:19 pm

Re: chipKIT hardware documentation

Post by Saggitarius » Sat Mar 24, 2012 8:22 pm

stefan646 wrote:I have a question about MAX32 : if I want to read a analog signal (from a sound card) using the MAX32 ADC should I use a buffer before the ADC ?

I'm just a fresh meat, get started use a MAX32 in my work, so my reply a suggestion only ATM. Have to check out sample rate/speed of MAX32's ADC, should minimum twice as your analog signal's highest frequency

User avatar
Saggitarius
Posts: 4
Joined: Fri Feb 03, 2012 9:19 pm

Re: chipKIT hardware documentation

Post by Saggitarius » Sat Mar 24, 2012 8:38 pm

Saggitarius wrote:
stefan646 wrote:I have a question about MAX32 : if I want to read a analog signal (from a sound card) using the MAX32 ADC should I use a buffer before the ADC ?

I'm just a fresh meat, get started use a MAX32 in my work, so my reply a suggestion only ATM. Have to check out sample rate/speed of MAX32's ADC, should minimum twice as your analog signal's highest frequency

As max232 use pic32mx795f512l, referring to datasheet, Max A/D Sample Rate (KSPS)1000, means 1Msa/sec, I reckon you don't need to buffer. Is that right?

GeneApperson
Posts: 239
Joined: Wed Jun 01, 2011 9:53 pm
Location: Pullman WA
Contact:

Re: chipKIT hardware documentation

Post by GeneApperson » Tue Jun 26, 2012 10:19 pm

Saggitarius wrote:
Saggitarius wrote:
stefan646 wrote:I have a question about MAX32 : if I want to read a analog signal (from a sound card) using the MAX32 ADC should I use a buffer before the ADC ?

I'm just a fresh meat, get started use a MAX32 in my work, so my reply a suggestion only ATM. Have to check out sample rate/speed of MAX32's ADC, should minimum twice as your analog signal's highest frequency

As max232 use pic32mx795f512l, referring to datasheet, Max A/D Sample Rate (KSPS)1000, means 1Msa/sec, I reckon you don't need to buffer. Is that right?
The A/D converter in the PIC32 devices can perform at up to 1Msps. This doesn't mean, though, that you can use the analogRead function and expect to get that kind of performance. Sampling a continuous audio stream in this way requires both a reasonable sample rate and constant rate sampling. Any jitter in the time interval between samples turns into noise in the resulting sampled signal. The analogRead function provides no mechanism to get a precise sample rate (with precise intervals between samples).

By reasonable sample rate, I mean that sampling theory says you need to sample more than two samples per second for the highest frequency component in the signal being sampled. So, for example, for a 10Khz analog bandwidth signal, your sample rate must be at least 20Ksps. Undersampling produces what is called aliasing, which turns up as false frequencies in the sampled signal. This also means that you need to band-limit the input signal (using a low pass filter) to make sure that there aren't high frequency components in the signal being sampled.

I'm not aware of a good A/D library for chipKIT (doesn't mean that there isn't one, just that if there is I don't know about it). Absent that, you would need to talk directly to the hardware to set up the A/D converter to get constant rate sampling.

Gene Apperson
Digilent

knuckles
Posts: 23
Joined: Mon Jul 23, 2012 5:19 pm

Re: chipKIT hardware documentation

Post by knuckles » Wed Jul 25, 2012 5:09 pm

plenty of idiots guides on youtube would be a help to us and your sales.
just basic stuff to get newbies moving then things start to drop into place .
theres a video of the basic io board display working but no details of how it is accomplished .its all a mystery so far .
even though i have been thru the documentation

impressive but its like a david blane mystery of how does he do it ,he is a magician

http://www.youtube.com/watch?v=0gqZJ-f9ZSw

JordanR
Posts: 46
Joined: Thu Jun 28, 2012 10:56 pm

Re: chipKIT hardware documentation

Post by JordanR » Wed Jul 25, 2012 5:56 pm

Hello knuckles,

The project he is running is actually the OledFullDemo that comes with the IOShieldOled library. The library provides functions for drawing characters, lines, squares, and patterns to the OLED display.

If you would like, you can download the libraries from the chipKIT Basic I/O Shield product page and run the demo yourself. The demo code itself is well commented, and there is also a PDF document that comes with the library to explain each function it provides.

Download the .zip file, and extract the libaries into your Sketchbook into a folder called "libraries". If you open MPIDE and go to File->Preferences you can find the location of your Sketchbook. Once you have the library files in your Sketchbook, open MPIDE and go to File->Examples, and you should see the IOShield libraries. I hope this is helpful to you!

Best Regards,

Jordan R
Digilent

knuckles
Posts: 23
Joined: Mon Jul 23, 2012 5:19 pm

Re: chipKIT hardware documentation

Post by knuckles » Thu Jul 26, 2012 2:33 pm

i tried what you said and get a error message as follows
even though the files are seen in the llibrary
from sketch menu

C:\mpide\mpide-0023-windows-20111221\.\hardware\pic32\libraries\OLED\OledDriver.cpp:59:18: fatal error: DSPI.h: No such file or directory
compilation terminated.

JordanR
Posts: 46
Joined: Thu Jun 28, 2012 10:56 pm

Re: chipKIT hardware documentation

Post by JordanR » Thu Jul 26, 2012 6:52 pm

Hello knuckles,

Try downloading the IOShieldOled libraries from the Basic I/O Shield product page. The IOShieldOled and OLED libraries are not exactly the same. For one, the IOShieldOled library does not use DSPI.h. I was not able to reproduce the error you are getting, but I would recommend not saving custom libraries (such as the IOShieldOled and the OLED libraries) to the directory you currently have the OLED library saved to. Your Sketchbook should be independent of your mpide-0023-windows-20111221 files. Create your own folder called libraries in your independent Sketchbook directory. Again, you can find the location/change the location of your Sketchbook by navigating to File->Preferences after you open MPIDE.

Best Regards,

Jordan R
Digilent

knuckles
Posts: 23
Joined: Mon Jul 23, 2012 5:19 pm

Re: chipKIT hardware documentation

Post by knuckles » Fri Jul 27, 2012 4:47 pm

still no luck ,i rebuilt the file from scratch and started afresh but still getting- error no file or directory wont compile .
i dont have any idea what the file tree should look like .

i followed the instructions in the readme file,unzipped in the libraries folder ,started up MPIDE again but nothing extra seen in the sketch/import library folder under contributed .

nothing extra seen in the examples folder either .

tried manually putting the files in the libraries folder where they match the other files too

followed this



1. Start MPIDE
2. Look under File->Preferences and take note of your Sketchbook Location
3. Shutdown MPIDE
4. under your Sketchbook directory create a subdirectory called "libraries"; this directory may already exist.
5. Unzip the OLED in the libraries directory.
6. Restart MPIDE
7. You should see the new libraries under Sketch->Import LIbrary, under Contributed
8. Also you should see under File->Examples the chipKIT library examples directories.

knuckles
Posts: 23
Joined: Mon Jul 23, 2012 5:19 pm

Re: chipKIT hardware documentation

Post by knuckles » Sat Jul 28, 2012 5:39 pm

put the downloaded files into C.mpide/libraries and unzipped them and win files show them all there with the exisiting files

but below is not the case

You should see the new libraries under Sketch->Import LIbrary, under Contributed
8. Also you should see under File->Examples the chipKIT library examples directories.

Post Reply