atramposch7 2 Posted June 6, 2013 Share Posted June 6, 2013 Hey all, I have attempted to take this project, http://forum.43oh.com/topic/1999-sd-media-player-with-fat16/, which was written for a G2353, and port it to a G2553. The main differences being: 1. USI on the G2353 vs. USCI on the G2553 2. Timer0_A3 on the G2353 has 3 control/compare registers, I needed to change the timer to Timer1_A3 on the G2553 since thats where it has 3 control/compare registers. 3. I also changed the pin defines to match the G2553. 4. Also the original project uses an SD card, while i am attempting to use a MicroSD card breakout board (should work the same as both can be formatted in FAT16, also the breakout board from sparkfun makes changing the files on the card super easy, plus it looks clean ) 5. I think thats about it... Overall, I am not quite sure about the .wav file format and how it needs to be placed on the the MicroSD card, ive seen people write raw data to the card in other projects, but that seems to defeat the point of the file system implementation... My current .wav file a mono, 24Khz sampled, 8 Bit .wav file (seems to be the kind of file the original project was using) I've attached the code I've been working on and a few pictures of the project itself. Also here is the pinout i am working with: P1.3- Chip Select (Attached to CS pin on microSD breakout board) P1.4- Card Detect(Attached to CD pin on microSD breakout board) P1.5- SCLK (Attached to SCK pin on microSD breakout board) P1.6- SOMI (Attached to DO pin on microSD breakout board) P1.7- SIMO (Attached to DI pin on microSD breakout board) P2.2- Left Channel Speaker output (Using TA1.1) P2.4- Right Channel Speaker output (Using TA1.2) The other pins i have connected in the picture are for UART console stuff and can be ignored. Any help would be greatly appreciated. Thanks again for taking the time to read this post. Cheers. Project_4_FAT.zip chicong 1 Quote Link to post Share on other sites
tripwire 139 Posted June 6, 2013 Share Posted June 6, 2013 Hey all, I have attempted to take this project, http://forum.43oh.com/topic/1999-sd-media-player-with-fat16/, which was written for a G2353, and port it to a G2553. The main differences being: (...) 2. Timer0_A3 on the G2353 has 3 control/compare registers, I needed to change the timer to Timer1_A3 on the G2553 since thats where it has 3 control/compare registers. Huh? Timer 0 on the G2553 has three CCRs as well. Were you getting compile errors before you changed over to Timer 1? Quote Link to post Share on other sites
spirilis 1,265 Posted June 6, 2013 Share Posted June 6, 2013 Which chip was it on before? Couldn't have been a G2353 since all G2xx3 chips have USCI. Was it G2352 perhaps? Sent from my Galaxy Note II with Tapatalk Quote Link to post Share on other sites
cde 334 Posted June 6, 2013 Share Posted June 6, 2013 Which chip was it on before? Couldn't have been a G2353 since all G2xx3 chips have USCI. Was it G2352 perhaps? Sent from my Galaxy Note II with Tapatalk Yea, the original project uses the g2352. Typo. Quote Link to post Share on other sites
atramposch7 2 Posted June 6, 2013 Author Share Posted June 6, 2013 Huh? Timer 0 on the G2553 has three CCRs as well. Were you getting compile errors before you changed over to Timer 1? Well i wanted to use TA0.1, and TA0.2 for outputs for the left and right speakers, but TA0.2 doesnt exsist on the pinout in the datasheet for the G2553, so i changed it to Timer1. Plus I'm using a lot of the PORT1 pins for console and SPI work. So i wanted to just move that to PORT2. tripwire 1 Quote Link to post Share on other sites
tripwire 139 Posted June 7, 2013 Share Posted June 7, 2013 Well i wanted to use TA0.1, and TA0.2 for outputs for the left and right speakers, but TA0.2 doesnt exsist on the pinout in the datasheet for the G2553, so i changed it to Timer1. Plus I'm using a lot of the PORT1 pins for console and SPI work. So i wanted to just move that to PORT2. Aha, I see the problem now. I hadn't noticed the lack of TA0.2 output connection on the 20pin 2553 before Quote Link to post Share on other sites
GarySeven 8 Posted June 9, 2013 Share Posted June 9, 2013 For information about the .wav file format, check out this link https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ It tells what you need to decode a .wav file for playing. Quote Link to post Share on other sites
caaruizbe 0 Posted August 15, 2013 Share Posted August 15, 2013 does your code works actually? Quote Link to post Share on other sites
pedrinnnn 0 Posted September 11, 2013 Share Posted September 11, 2013 have you tried a 16kHz sampled file? Quote Link to post Share on other sites
chicong 0 Posted March 11, 2014 Share Posted March 11, 2014 b?n c Quote Link to post Share on other sites
rampadc 29 Posted March 12, 2014 Share Posted March 12, 2014 @chicong Pretty sure this is an English forum. Pin 1 on your SD card would be the CD pin in his setup. (Google Translate) http://elasticsheep.com/2010/01/reading-an-sd-card-with-an-atmega168/ Sent from my Nexus 7 using Tapatalk bluehash 1 Quote Link to post Share on other sites
mafiaWolf 0 Posted March 14, 2015 Share Posted March 14, 2015 Have you got any demo?It 's a nice project Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.