View previous topic :: View next topic |
Author |
Message |
benoit
Joined: 24 Jul 2007 Posts: 177
|
Posted: Sun Jul 15, 2012 10:06 am Post subject: WORK WITH ATMEG8 but |
|
|
HELLO
this code work with atmega8
find a file and reading it is simple
but after the first reading i can t read another file sdinit or sdinitfs hang up
even if i reset the power of the sdcard
i must reset the atmega8 for restart ,because a loop at the begining of the program make a hang up
what did i must do to solve this problem
thank you for your comments |
|
Back to top |
|
|
KokkeKat
Joined: 08 May 2011 Posts: 59 Location: Stockholm
|
Posted: Wed Jul 18, 2012 8:54 pm Post subject: |
|
|
Hi Benoit,
Could you please post the code you are having problems with and also describe the circuit?
Kind regards
Niclas |
|
Back to top |
|
|
benoit
Joined: 24 Jul 2007 Posts: 177
|
Posted: Sun Jul 22, 2012 1:58 pm Post subject: |
|
|
HELLO NICLAS
thank you for this nice job
well in fact in the sub file Example_FIND_READ_FILE
sdeof must be set to 0
sdbytesread must be set to 0 at the begining otherwise when you reenter the file eof is directly set to 1 because sdbyteread not reseted and file end is reached .
well the config is very simple , it is at mega8 with 3.3 power supply and sdcard on spi with 5k pull up resistor
i will try to do low cost wave player yet
thank you for support |
|
Back to top |
|
|
KokkeKat
Joined: 08 May 2011 Posts: 59 Location: Stockholm
|
Posted: Sun Jul 22, 2012 8:39 pm Post subject: |
|
|
Salut Benoit,
Vous avez raison. Merci pour m'informer de ces erreurs.
This applies to both the FIND and the DIRLIST versions. I will update the sticky thread with these bugfixes. Please let me know if you come across more errors or if you get stuck.
(Maybe you know this already, but www.vlsi.fi make some ICs that make playing wav/mp3/... files quite simple. Breakout boards can be bought from www.sparkfun.com or perhaps some domestic resellers. In Sweden, at least www.lawicel.se sells their products.)
Kind regards
Niclas |
|
Back to top |
|
|
Stefanus
Joined: 14 Aug 2012 Posts: 8
|
Posted: Sat Aug 18, 2012 7:17 am Post subject: MMC with ATMEGA8 |
|
|
Hi, i need help. iwant to read directory and select file name and send to PC via UART
anybody can help me. MCU ATMEGA8
Thank you |
|
Back to top |
|
|
KokkeKat
Joined: 08 May 2011 Posts: 59 Location: Stockholm
|
Posted: Sat Aug 18, 2012 9:08 am Post subject: |
|
|
Hi Stefanus,
Please see Application Note #186. It contains an overview of the library. You will also find code samples in the code download. The latest version can be found in one of the sticky threads. The samples should cover your question. Regarding sending data via UART, please see the BASCOM help.
If you decide to post more questions after reading the AN and testing the samples, do this by creating a new thread. This thread was created by Benoit, so it should only contain posts that are relevant to the problem he was facing. (Thread hijacking.)
Kind regards
Niclas |
|
Back to top |
|
|
benoit
Joined: 24 Jul 2007 Posts: 177
|
Posted: Sat Aug 18, 2012 3:01 pm Post subject: wave player ok |
|
|
hello kokkekat is good for wave player with atmega8 for music 8 bit 22khz pwm and sd card 1gb
256 bit free must be used as double buffering for play sound
all ok
thank you niclas for this great kokkekat |
|
Back to top |
|
|
KokkeKat
Joined: 08 May 2011 Posts: 59 Location: Stockholm
|
Posted: Sat Aug 18, 2012 7:49 pm Post subject: |
|
|
Thanks Benoit!
I'm happy to hear that everything works fine.
Actually, the reason I developed this lib was to be able to use AVRs with little SRAM, so it's extra nice that you are using it with an ATmega8.
Could you please briefly describe how you are generating the sound with 8-bit 22kHz PWM?
Kind regards
Niclas |
|
Back to top |
|
|
benoit
Joined: 24 Jul 2007 Posts: 177
|
Posted: Sun Aug 19, 2012 7:07 am Post subject: |
|
|
WELL
the config:
I USE ATMEGA8 WITH EXTERNAL 32 MHZ OSCILLATOR and 5 volt voltage (16mhz should work to)
a sd card is connected to the 5v with 3 diodes in serial for made the 3v3 for sd card
the sd card signals are connected to the avr spi hard through 680 ohms
the soft:
i read the sd card sound file into a buffer in ram of 256 byte and the data are send to pwma at rate of at timer interrupt of 22khz
the buffer is refilled before ending,the interrupt allow to send data during the access to sd card
that all |
|
Back to top |
|
|
amirf
Joined: 25 Aug 2009 Posts: 154
|
Posted: Tue Nov 19, 2013 8:45 am Post subject: |
|
|
benoit : forum will be happy if you willing to share your codes |
|
Back to top |
|
|
benoit
Joined: 24 Jul 2007 Posts: 177
|
Posted: Tue Nov 26, 2013 10:07 am Post subject: |
|
|
OK CODE WILL COME SOON |
|
Back to top |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Tue Nov 26, 2013 2:35 pm Post subject: |
|
|
_________________ For technical reasons, the signature is on the back of this message. |
|
Back to top |
|
|
benoit
Joined: 24 Jul 2007 Posts: 177
|
|
Back to top |
|
|
KokkeKat
Joined: 08 May 2011 Posts: 59 Location: Stockholm
|
Posted: Fri Feb 07, 2014 10:09 pm Post subject: |
|
|
Hi Benoit
Sorry for my late response. I would just like to say that I am impressed and grateful for your sharing of your project.
Thanks!
Niclas |
|
Back to top |
|
|
benoit
Joined: 24 Jul 2007 Posts: 177
|
|
Back to top |
|
|
|