Audio from dataflash using atmega168

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My problem:
I need to play Music from ATMEGA168 using a Dataflash(AT45DB161D) to store Files.
I know this been kind of a recursive topic here. I have read all post I found related to that matter and still unable to get it working right.
However i can play sounds directly from ATMEGA168 internal flash. I do this using PWM on OCR0Apin. I converted a plain Wav file to a C array using WAV2C. (http://thieumsweb.free.fr/englis... - tools section) and then play 1 sample every interrupt.
What I cant get working:
Read and write fromDataflash. I followed every post I found and still this don’t work.
Transfer Files from pc to Dataflash. im connected to PC via FT232RL USB chip(serial comunication). Not sure how I should transfer this files. Not even sure if I have to transfer the .c file or which.

Please help me out.

A bit of Background:
I’m helping a team of friends (Design Students) to make the software for their Last university project.
They are building an interactive children’s room (with games, built in alarm clock and some leds here and there).
They already have the hardware made. So I can’t change Microcontroller or pinout. However a teacher here at school says it’s correctly wired.
Basically im done with almost everything related to software but can’t finish this

P.D. I know this forum get lots of last minute CFH(call for help) but i still have some time and dont want to get to last minute. Got till May 6th to get this working

I'll really appreciate your help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

App note AVR335 shows how to read and write from Dataflash. So you will just need to send your WAV file down the UART for subsequent writing to the DataFlash.

I would suggest that your AVR routine just blindly copies to the DataFlash, and finishes when the DataFlash is full or the UART line goes quiet. Hyperterminal will just send the WAV file byte by byte.

Alternatively implement one of the simpler Hyperterminal file protocols like Xmodem.

David.