SD e-block
Moderator: Benj
SD e-block
Hi,
You show a example of playing a wav file from a sd card e-block, but can you give me some more info
1. the chip config in example is shaded out, what is the clock speed (internal,rc,xtal)
2. the sound output is on what pin (pwm)
3. what input is card reader on
4. what kind of circuit did you use to play the sound
5. what is the jumper position on the board as could not see the ic listed
looking forward to your reply
You show a example of playing a wav file from a sd card e-block, but can you give me some more info
1. the chip config in example is shaded out, what is the clock speed (internal,rc,xtal)
2. the sound output is on what pin (pwm)
3. what input is card reader on
4. what kind of circuit did you use to play the sound
5. what is the jumper position on the board as could not see the ic listed
looking forward to your reply
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: SD e-block
Hi,
Chip select>>PORTA<2>
Clock >>PORTA<3>
Data In >>PORTA<4>
Data Out >>PORTA<5>
I can see the IC list with jumper position here in the above datasheet...which pic you intend to use..please let us know.
The example 7. Streaming a WAV file using PWM to play audio uses ECIO-40 where 48MHz clock was used as system clock. But you can use the same code with 4 to 48MHz external clock source with PIC18f4455. You can tell us which PIC you are going to use and which programmer or development board you are using.1. the chip config in example is shaded out, what is the clock speed (internal,rc,xtal)
The example uses channel 1 as PWM output which is connected to RC2 (PIN17 of PIC18f4455 but PIN 29 of ECIO-40).2. the sound output is on what pin (pwm)
Card reader has following connections:3.what input is card reader on
Chip select>>PORTA<2>
Clock >>PORTA<3>
Data In >>PORTA<4>
Data Out >>PORTA<5>
As this is audio signal any simple audio driver using transistor from RC2 which will drive a speaker is enough to play the sound..4.what kind of circuit did you use to play the sound
http://www.matrixmultimedia.com/resourc ... 7-30-1.pdf5. what is the jumper position on the board as could not see the ic listed
I can see the IC list with jumper position here in the above datasheet...which pic you intend to use..please let us know.
Re: SD e-block
I was going to use a PIC16F877/A with it's internal clock on a EB006 development board using Flowcode 4, there a limit to the size of memory card or class
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: SD e-block
Actually You can't use PIC16f877a for SD card due to it's RAM size..Better to move to PIC18f4455 with 20MHz external clock and EB006 is fine..
You can follow following Ben's post.
http://www.matrixmultimedia.com/mmforum ... =26&t=4850
You can follow following Ben's post.
http://www.matrixmultimedia.com/mmforum ... =26&t=4850
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SD e-block
Hello,
Please try this example instead. It uses the FAT component rather then a custom component.
Please try this example instead. It uses the FAT component rather then a custom component.
- Attachments
-
- 7. Streaming a WAV file using PWM.fcf
- (16.21 KiB) Downloaded 371 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: SD e-block
Hi,
Although what Ben's post is right one for ECIO-40 but if you are using PIC18f4455 with 20MHz external clock you should use the attached file..We have recently tested this one which seems to have right config for PIC18f4455.
One suggestion for posting the error, it's better to post the msg file in achievement which is in the same folder of your .fcf file. It saves space of the post and looks better.
Although what Ben's post is right one for ECIO-40 but if you are using PIC18f4455 with 20MHz external clock you should use the attached file..We have recently tested this one which seems to have right config for PIC18f4455.
One suggestion for posting the error, it's better to post the msg file in achievement which is in the same folder of your .fcf file. It saves space of the post and looks better.
- Attachments
-
- Sound Wav Player FAT16 V0.4.fcf
- (16.04 KiB) Downloaded 392 times
Re: SD e-block
Hi,
Can iuse a 19.6608 Crystal ? thats all i got at hand at the moment. Because at present i'm using that crystal and getting the following on the LCD
Opening file
File Error: 239
Rgds
Wayne
Can iuse a 19.6608 Crystal ? thats all i got at hand at the moment. Because at present i'm using that crystal and getting the following on the LCD
Opening file
File Error: 239
Rgds
Wayne
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SD e-block
Hi Wayne,
We have had reports that a 19.6608MHz crystal will work with the 18F4455 family to get a clock of around 48MHz and this is stable enough to run the USB components. Simply change the PLL crystal value in the chip configuration to 20MHz and it should work ok.
We have had reports that a 19.6608MHz crystal will work with the 18F4455 family to get a clock of around 48MHz and this is stable enough to run the USB components. Simply change the PLL crystal value in the chip configuration to 20MHz and it should work ok.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: SD e-block
Hi
What is PLL ? is it a internal clock ? and how do i change it
Thanks for your help
Rgds
Wayne
What is PLL ? is it a internal clock ? and how do i change it
Thanks for your help
Rgds
Wayne
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SD e-block
Hi Wayne,
PLL (phase locked loop) is a clock frequency multiplier, it takes your input clock frequency and converts it up into a high frequency to drive the primary oscillator at 48MHz allowing for a system clock speed of 12MIPs which is compatible with full speed USB.
To change the PLL settings for the 18F4455 family simply change the "OSC Select" config setting to match your crystal. "div by 5 {20MHz input}" for your 19.6608MHz crystal.
This article contains details of how to setup the config settings for these devices.
http://www.matrixmultimedia.com/resourc ... %20PIC.pdf
PLL (phase locked loop) is a clock frequency multiplier, it takes your input clock frequency and converts it up into a high frequency to drive the primary oscillator at 48MHz allowing for a system clock speed of 12MIPs which is compatible with full speed USB.
To change the PLL settings for the 18F4455 family simply change the "OSC Select" config setting to match your crystal. "div by 5 {20MHz input}" for your 19.6608MHz crystal.
This article contains details of how to setup the config settings for these devices.
http://www.matrixmultimedia.com/resourc ... %20PIC.pdf
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: SD e-block
Hi,
its the example program you sent me, please check chip config on my program
using EB006 Board with a 19.6608 Mhz
EB037 with jumpers on "A" and 5V and 16M MMC Card
Thanks
Wayne
its the example program you sent me, please check chip config on my program
using EB006 Board with a 19.6608 Mhz
EB037 with jumpers on "A" and 5V and 16M MMC Card
Thanks
Wayne
- Attachments
-
- Sound Wav Player FAT16 V0.4.fcf
- (16.04 KiB) Downloaded 276 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SD e-block
Hi Wayne,
The CPU Sys CLK Select should be set to No Divide. You can also probably disable the fail safe clock monitor.
Other then that everything looks ok.
If you want to confirm on hardware then perform the simple 1 second flasher test.
What about trying the FAT component on PortD, I believe there may be some complexity with some of the PortA pins which can cause problems.
The CPU Sys CLK Select should be set to No Divide. You can also probably disable the fail safe clock monitor.
Other then that everything looks ok.
If you want to confirm on hardware then perform the simple 1 second flasher test.
What about trying the FAT component on PortD, I believe there may be some complexity with some of the PortA pins which can cause problems.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: SD e-block
Hi,
Still having problems now it will not ID the chip when compiling or clicking on auto detect. Place a 16f877 in the ic socket and it see's it no problem, changed it with a new 18f4455 and i get " Could not ID onboard chip "
Any ideas
Wayne
Still having problems now it will not ID the chip when compiling or clicking on auto detect. Place a 16f877 in the ic socket and it see's it no problem, changed it with a new 18f4455 and i get " Could not ID onboard chip "
Any ideas
Wayne
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: SD e-block
Hi,
Do you have any other module connected in PORTs especially PORTB? please remove all modules from ports and try to detect PIC18f4455.
Do you have any other module connected in PORTs especially PORTB? please remove all modules from ports and try to detect PIC18f4455.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SD e-block
Hello,
It might also be worth playing around with these options in PPP to see if any of these help.
It might also be worth playing around with these options in PPP to see if any of these help.
- Attachments
-
- PPP_Options.jpg (77.61 KiB) Viewed 14015 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: SD e-block
Hi,
OK i have load a program to the 4455 ic that just prints "HI" in one second intervals to the LCD , but when loaded to the hardware it takes 20 seconds to repeat the message. i think this is the problem but how do i solve it to get the timing correct
Rgds
Wayne
OK i have load a program to the 4455 ic that just prints "HI" in one second intervals to the LCD , but when loaded to the hardware it takes 20 seconds to repeat the message. i think this is the problem but how do i solve it to get the timing correct
Rgds
Wayne
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SD e-block
Hi Wayne,
Check your clock speed and configuration settings are correct for your hardware in the project options and the delays should start working correctly.
If your in doubt then attach your program to the forums and detail the setup of your hardware. eg what crystal speed etc.
Check your clock speed and configuration settings are correct for your hardware in the project options and the delays should start working correctly.
If your in doubt then attach your program to the forums and detail the setup of your hardware. eg what crystal speed etc.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: SD e-block
Its a 20 Mhz crystal (i also tried a 19.6608) on a EB006 development board and used the setting from emanuel program and also tried to adjust them but nothing seem to change ???
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: SD e-block
Hi,
Can you please post the program so that we can see whether you have changed correctly or not?
Can you please post the program so that we can see whether you have changed correctly or not?
Re: SD e-block
Hi,
I am now a step closer, the card was not formatted right. But the only problem now is i only get about 2 seconds of sound then it locks up and all i get is a hiss or a looped noise like a dirty cd . any ideas ?
Thanks for your help so far
Wayne
I am now a step closer, the card was not formatted right. But the only problem now is i only get about 2 seconds of sound then it locks up and all i get is a hiss or a looped noise like a dirty cd . any ideas ?
Thanks for your help so far
Wayne
Re: SD e-block
hI
Please find attached program
regards
Wayne
Please find attached program
regards
Wayne
- Attachments
-
- Sound Wav Player FAT16 V0.4.fcf
- (16.03 KiB) Downloaded 275 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SD e-block
Hi Wayne,
Have you tried doing a full format of the SD card (not a quick format) and then putting the wav file on the card.
Is the problem cyclical eg it comes and goes or once the corruption has been reached is that it?
Does the EOF marker come up on the LCD at all?
I have recently made numerous fixes to the FAT component for v5 to try and speed up the access speeds and to help the calculations work correctly with larger addresses. Saying this I did have a WAV player working nicely in v4 using this chip so it should work. Is the sample rate on your wav file ok? eg 8KHz 8-bit mono?
Have you tried doing a full format of the SD card (not a quick format) and then putting the wav file on the card.
Is the problem cyclical eg it comes and goes or once the corruption has been reached is that it?
Does the EOF marker come up on the LCD at all?
I have recently made numerous fixes to the FAT component for v5 to try and speed up the access speeds and to help the calculations work correctly with larger addresses. Saying this I did have a WAV player working nicely in v4 using this chip so it should work. Is the sample rate on your wav file ok? eg 8KHz 8-bit mono?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel