Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

WORK WITH ATMEG8 but

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> KokkeKat FAT-free SD card lib
View previous topic :: View next topic  
Author Message
benoit

Bascom Member



Joined: 24 Jul 2007
Posts: 177

france.gif
PostPosted: Sun Jul 15, 2012 10:06 am    Post subject: WORK WITH ATMEG8 but Reply with quote

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
View user's profile
KokkeKat

Bascom Member



Joined: 08 May 2011
Posts: 59
Location: Stockholm

sweden.gif
PostPosted: Wed Jul 18, 2012 8:54 pm    Post subject: Reply with quote

Hi Benoit,

Could you please post the code you are having problems with and also describe the circuit?

Kind regards

Niclas
Back to top
View user's profile
benoit

Bascom Member



Joined: 24 Jul 2007
Posts: 177

france.gif
PostPosted: Sun Jul 22, 2012 1:58 pm    Post subject: Reply with quote

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
View user's profile
KokkeKat

Bascom Member



Joined: 08 May 2011
Posts: 59
Location: Stockholm

sweden.gif
PostPosted: Sun Jul 22, 2012 8:39 pm    Post subject: Reply with quote

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
View user's profile
Stefanus

Bascom Member



Joined: 14 Aug 2012
Posts: 8

PostPosted: Sat Aug 18, 2012 7:17 am    Post subject: MMC with ATMEGA8 Reply with quote

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
View user's profile
KokkeKat

Bascom Member



Joined: 08 May 2011
Posts: 59
Location: Stockholm

sweden.gif
PostPosted: Sat Aug 18, 2012 9:08 am    Post subject: Reply with quote

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
View user's profile
benoit

Bascom Member



Joined: 24 Jul 2007
Posts: 177

france.gif
PostPosted: Sat Aug 18, 2012 3:01 pm    Post subject: wave player ok Reply with quote

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
View user's profile
KokkeKat

Bascom Member



Joined: 08 May 2011
Posts: 59
Location: Stockholm

sweden.gif
PostPosted: Sat Aug 18, 2012 7:49 pm    Post subject: Reply with quote

Thanks Benoit!

I'm happy to hear that everything works fine. Smile

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
View user's profile
benoit

Bascom Member



Joined: 24 Jul 2007
Posts: 177

france.gif
PostPosted: Sun Aug 19, 2012 7:07 am    Post subject: Reply with quote

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
View user's profile
amirf

Bascom Member



Joined: 25 Aug 2009
Posts: 154

indonesia.gif
PostPosted: Tue Nov 19, 2013 8:45 am    Post subject: Reply with quote

benoit : forum will be happy if you willing to share your codes Smile
Back to top
View user's profile
benoit

Bascom Member



Joined: 24 Jul 2007
Posts: 177

france.gif
PostPosted: Tue Nov 26, 2013 10:07 am    Post subject: Reply with quote

OK CODE WILL COME SOON
Back to top
View user's profile
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Tue Nov 26, 2013 2:35 pm    Post subject: Reply with quote


_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
benoit

Bascom Member



Joined: 24 Jul 2007
Posts: 177

france.gif
PostPosted: Mon Dec 02, 2013 5:57 pm    Post subject: a wave player with kokkekat Reply with quote

hello
code and schematic is here in the shared program
http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=11968

have fun
Back to top
View user's profile
KokkeKat

Bascom Member



Joined: 08 May 2011
Posts: 59
Location: Stockholm

sweden.gif
PostPosted: Fri Feb 07, 2014 10:09 pm    Post subject: Reply with quote

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
View user's profile
benoit

Bascom Member



Joined: 24 Jul 2007
Posts: 177

france.gif
PostPosted: Tue Nov 11, 2014 10:41 am    Post subject: Reply with quote

HI ALL
does some one as tested this simple project
http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=11968

feedback and comment will be well come

hand Very Happy
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> KokkeKat FAT-free SD card lib All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum