SDRAM Load and Play By Hernacki, Kevin ECE3551 Final Project 25 April 2008.

Slides:



Advertisements
Similar presentations
TMS320C6713 Assembly Language (cont’d). Module 1 Exam (solution) 1. Functional Units a. How many can perform an ADD? Name them. a. How many can perform.
Advertisements

1 ELE271 Mon. April 7, Review LPM -Morse Code Lab -.ref and.def -Multiplication, shift.
Chung-Ta King National Tsing Hua University
C Examples 1.
Microcomputer Systems I ECE 3551 MOHAMMED ALYAMANI Instructor: Dr. Kepuska.
Mohammed Almajhad Final Project Dr. Kepuska. Intro My project idea is based on playing sound on different effects as we see these days. Also, adding a.
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
Boot Issues Processor comparison TigerSHARC multi-processor system Blackfin single-core.
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
Lab. 1 – Earlier Tasks. Needed by both application and demonstration lab. streams For more details – see the Lab. 1 web-site There will be a 20 min prelab-quiz.
Lab. 1 – Task 1 to 4 details For more details – see the Lab. 1 web-site There will be a 20 min prelab-quiz (based on Assignment 1 and 2) at the start of.
Hardware/software Interfacing. Page 2 Interrupt handling and using internal timer Two way for processor to accept external input: Waiting for input: Processor.
Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller.
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
Getting the O in I/O to work on a typical microcontroller Activating a FLASH memory “output line” Part 1 Main part of Laboratory 1 Also needed for “voice.
Blackfin BF533 EZ-KIT Control The O in I/O
3-1 System peripherals & Bus Structure Memory map of the LPC2300 device is one contiguous 32-bit address range. However, the device itself is made up of.
A Simple Tour of the MSP430. Light LEDs in C LEDs can be connected in two standard ways. Active high circuit, the LED illuminates if the pin is driven.
Volume. 1-the idea of the program is to increase, decrease the volume. 2-the program does the following: A-PF8:decrease the volume B-Pf9:increase the.
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
To use the blackfin processor BF-533 to implement what we have learned about the blackfin processor. My approach for this project by : Input Audio will.
EZ-Additive Synthesizer By Max Bastien 12/14/07. Problem Statement Mystery of keyboards reproducing a wide range of sounds from any particular instrument.
Home Audio System Stephen Whitaker March 2, 2009 Microcomputer Systems I Dr. Kepuska.
GameBoy Advance Programming Sound. Sound Basics The Digital Process A / D Fs D / A Sound pressure fluctuations Analog voltage Digital voltage Sampling.
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system Manual control of RC car.
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
Digitalized Surround Sound Effects Using ADSP BF 533 Kunal Gupta ECE 3551, 03 Fall, 2006.
Audio Led Bargraph Equalizer Final Project for ECE /02/09 Instructor: Dr Kepuska By; Anushan Weerasooriya & Chris Guzowski.
Lab. 1 – Required Tasks. For more details – see the Lab. 1 web-site.
Danielle Roy.  The goal of this project is to create an emulation of a popular children’s game. This game flashes a pattern at the player, and the player.
Microcomputer Systems I ECE 3551 Fahad Alqasim Instructor: Dr. Kepuska.
 By: Stanley O. Abada Presented to: Dr. V Kepuska December 4, 2010 Microcomputer 1.
Simon Says ECE 3551 Microcomputer Systems I Elizabeth Nelson.
Real Time Interrupts Section Real-Time Interrupt (RTI) Most operating systems (OS) require an interrupt every T seconds by the RTI RTI interrupts.
Loop Board ECE 3551 Final Project by Brian Robl. Objectives Use the Blackfin BF533 EZ-KIT to create a 4 track audio looper.  Utilize 32MB of external.
Handling multiple input signals Version #2 – co-operative scheduler Version #3 – pre-emptive scheduler.
LHO 22 C and the  The Silicon Labs ISE uses the Keil C51 compiler.  The code size is limiter to 2K  C has replaced PL/M (the original Intel high.
Audio Manipulation And Buffers using DSP-BF533 EZ-KIT Lite Dr. Veton Z. Këpuska By Husain Alotaibi Ahmed Alalyak ECE 3551 Microcomputer System I Spring.
Microcomputer Systems I ECE 3551 – Fall 2010 Ryan M. Winget.
Carey Eugene ECE 3551 May 5, The purpose of this project was to design and implement a karaoke machine with chipmunk audio effects. And then run.
Arduino libraries Datatekniker Udvidet hardware/software.
SNAP CIRCUITS INSTRUCTIONS 1.Make sure ALL parts are in place before beginning 2.Follow the Projects in order, starting with #1 3.The BLACK numbers show.
Microcomputer 1 Final Phantom Speakers Patrick Marinelli Matt Hopkins.
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
Lab. 1 – GPIO Pin control Using information ENEL353 and ENCM369 text books combined with Blackfin DATA manual.
ECE 3551 – Microcomputer Systems 1 Fall 2010 Siobhan Ireland.
ECE 3551 – Microcomputer Systems I By Md. Raqiq Islam AUDIO EFFECTS IMPLEMENTATION.
Embedded Programming and Robotics Lesson 11 Arduino Interrupts 1.
“Uber” Box Multifarious Systems 1 Pattarapong Rojanasthien Will Matthau.
Introduction 8051 Programming language options: Assembler or High Level Language(HLL). Among HLLs, ‘C’ is the choice. ‘C’ for 8051 is more than just ‘C’
Aaron Worob.  Create a program using the Blackfin BF533 that allows the user to “move” the source of input sound.
80C51 Block Diagram 1. 80C51 Memory Memory The data width is 8 bits Registers are 8 bits Addresses are 8 bits – i.e. addresses for only 256.
One more PIC18F252 example and revision for exam B222L Branislav Vuksanovic, UoP, ECE.
void Init_SDRAM(void) { if (*pEBIU_SDSTAT & SDRS) { *pEBIU_SDRRC = 0x ; *pEBIU_SDBCTL = 0x ; *pEBIU_SDGCTL = 0x d; *point =
TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names.
Introduction to Programming in RobotC
80C51 Block Diagram ECE Overview.
The Stack.
Sound effects with Rotation control
William Stallings Computer Organization and Architecture 8th Edition
How to avoid catching things on fire.
IoT Programming the Particle Photon.
Interrupts, Tasks and Timers
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
EECE.3170 Microprocessor Systems Design I
FIR and IIR Filters with on and off Functionality
EECE.3170 Microprocessor Systems Design I
Lab. 1 – GPIO Pin control Using information ENEL353 and ENCM369 text books combined with Blackfin DATA manual.
Year 10 Computer Science Hardware - CPU and RAM.
Post Lab Quiz 3 Review Assignment 2 Help
Presentation transcript:

SDRAM Load and Play By Hernacki, Kevin ECE3551 Final Project 25 April 2008

Overview  Purpose  Solution and Operation  Problems  Code  Initialize.c  ISR.c  Main.c  Talkthrough.h  Results  References

Purpose  To use the knowledge learned in ECE- 3551, to make a final project. The project is to 1: use the SDRAM as a storage device for a song, and then 2: to play it back, 3: to play it back at a faster speed, and 4: to play it back at a slower speed.

Solution and Operation  Press PF8 once: Load data into SDRAM and LED4 on.  Second press stops load, LED4 off, and pointer back to beginning.  Press PF9 once: Play data from SDRAM and LED5 on.  Second press stops play back, LED5 off, and pointer back to beginning.  Press PF10 once: Play data faster and LED6 on.  Second press stops play back, LED6 off, and pointer back to beginning.  Press PF11 once: Play data slower and LED7 on.  Second press stops play back, LED7 off, and pointer back to beginning.

Problems  The set-up, size, and the rate speed of the SDRAM.  Loading and unloading the SDRAM.  The Pointer for the SDRAM.  Controlling the pointer for the SDRAM to get fast and slow play.

Code; Initialize.c  Initializing the flags for the push buttons PF8 – PF11. void Init_Flags(void) { *pFIO_INEN= 0x0f00; //workaround for anomaly (PF8 - PF11 enabled) *pFIO_DIR = 0x0000; *pFIO_EDGE = 0x0f00; *pFIO_MASKA_D= 0x0f00; }  Initializing the SDRAM and Registers on the board. //SDRAM Setup void Init_SDRAM(void) { if (*pEBIU_SDSTAT & SDRS) { //SDRAM Refresh Rate Control Register *pEBIU_SDRRC = 0x ; //SDRAM Memory Bank Control Register *pEBIU_SDBCTL = 0x ; //SDRAM Memory Global Control Register *pEBIU_SDGCTL = 0x d; Buffl = pSDRAM_open; ssync(); } //end Init_SDRAM

SDRAM (Toolbar drop down)

ISR.c Loading the SDRAM EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { unsigned char led1;//Variable for LED4. unsigned char led2;//Variable for LED5. unsigned char led3;//Variable for LED6. unsigned char led4;//Variable for LED7. // confirm interrupt handling *pDMA1_IRQ_STATUS = 0x0001; if(openload==1)//If PF8=1 the data (song) is to be loaded into the SDRAM and LED4 on. { iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0];//Data from DAC left to left channel-in. iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; //Data from DAC right to right channel-in. iChannel0LeftOut = iChannel0LeftIn;//Data from left channel-in to left channel-out. iChannel0RightOut = iChannel0RightIn;//Data from right channel-in to right channel-out. iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut;//Data from channel-out to DAC. iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut;//Data from channel-out to DAC. *Buffl++ = (short)(iChannel0LeftIn>>8);//Load data self-increment into SDRAM. // from channel-in right shift 8. led1 = 0x01;//Turn LED4 on. if(Buffl>pSDRAM_end)//If Buffl at pSDRAM_end stop value, stop loading and turn off LED4. { Buffl=pSDRAM_open;//Pointer Buffl to first space in storage SDRAM. led1=0x00;//LED4 off. openload=0;//Stop data load of SDRAM. } *pFlashA_PortB_Data = led1;//LED4 in used. } if(openload==2)//If PF8=2 the SDRAM load will stop, // LED4 off, and openload to 0. { *pFlashA_PortB_Data=0x00;//LED4 off. openload=0; //Openload reset to 0. }

IRS.c Play back from SDRAM. if(playload==1)//If PF9=1 the data (song) is to be played back from SDRAM and LED5 on. { led2=0x02;//LED5 on. ChannelLeftOut = *Buffl++; //Play data self-increment from SDRAM into channel-out. iChannel0LeftOut = ((int) ChannelLeftOut)<<8;//Channel-out to channel-out interger shift left 8. iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut;//Channel-out to DAC left. iTxBuffer1[INTERNAL_DAC_R0] = iChannel0LeftOut;//Channel-out to DAC right. if(Buffl>pSDRAM_end)//If Buffl at pSDRAM_end stop value, // stop playing and turn off LED5. { Buffl=pSDRAM_open;//Pointer Buffl to first space in storage SDRAM. led2=0x00;//LED5 off. playload=0;//Stop data playing of SDRAM. } *pFlashA_PortB_Data = led2;//LED5 in used. } if(playload==2)//If PF9=2 the SDRAM play back will stop, // LED5 off, and playload reset to 0. { *pFlashA_PortB_Data=0x00;//LED5 off. playload=0;//Playback reset to 0. }

ISR.c Play back faster from SDRAM. if(fast==1)//If PF10=1 the data (song) is to be played back faster from SDRAM and LED6 on. { led3=0x04;//LED6 on. x =Buffl++;//Pointer address self-increment from SDRAM into x. ptrf=x*2;//Play only even addresses from SDRAM = to ptr. ChannelLeftOut = *ptrf++; //Play data self-increment from SDRAM into channel-out. iChannel0LeftOut = ((int) ChannelLeftOut)<<8;//Channel-out to channel-out interger shift left 8. iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut;//Channel-out to DAC left. iTxBuffer1[INTERNAL_DAC_R0] = iChannel0LeftOut; //Channel-out to DAC right. if(Buffl>pSDRAM_end)//If Buffl at pSDRAM_end stop value, stop playing and turn off LED6. { Buffl=pSDRAM_open;//Pointer Buffl to first space in storage SDRAM. led3=0x00;//LED6 off. fast=0;//Stop data playing of SDRAM. } *pFlashA_PortB_Data = led3;//LED6 in used. } if(fast==2)//If PF10=2 the faster play back will stop, LED6 off, and fast reset to 0. { *pFlashA_PortB_Data=0x00;//LED6 off. fast=0;//Fast reset to 0. }

ISR.c Play back slower from SDRAM. if(slow==1)//If PF11=1 the data (song) is to be played back slower from SDRAM and LED7 on. { led4=0x08;//LED7 on. ptrs = Buffl ;//Play samples. if (a>1)//If a >1, is the counter variable for a one cycle count. { Buffl++;//On the second cycle the pointer get incremented. a=0;//The a is reset to 0. } ptrs = Buffl;//Buffl address value = ptrs. a++;//The a is incremented by one. ChannelLeftOut = *ptrs;//The data at the address is fed into channel-out. iChannel0LeftOut = ((int) ChannelLeftOut)<<8;//Channel-out to channel-out interger shift left 8. iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut;//Channel-out to DAC left. iTxBuffer1[INTERNAL_DAC_R0] = iChannel0LeftOut;//Channel-out to DAC right. if(Buffl>pSDRAM_end)//If Buffl at pSDRAM_end stop value, stop playing and turn off LED6. { Buffl=pSDRAM_open;//Pointer Buffl to first space in storage SDRAM. led4=0x00;//LED6 off. fast=0;//Stop data playing of SDRAM. } *pFlashA_PortB_Data = led4;//LED7 in used. } if(slow==2)//If PF11=2 the slow play back will stop, // LED7 off, and slow reset to 0. { *pFlashA_PortB_Data=0x00;//LED7 off. slow=0;//Slow reset to 0. }

ISR.c FlagA EX_INTERRUPT_HANDLER(FlagA_ISR) { if(*pFIO_FLAG_C == 0x0100)//PF8 switch. { *pFIO_FLAG_C = 0x0100;//Confirm interrupt handling workaround for anomaly openload++;//Openload variable, self-increment, load into SDRAM. if(openload==3)//If openload=2, stop loading data. openload=0;//PF8 toggled off from loading data (song) into SDRAM, LED4 off. Buffl=pSDRAM_open;//Buffl pointer set back to first space in SDRAM. } if (*pFIO_FLAG_C == 0x0200)//PF9 switch.. { *pFIO_FLAG_C = 0x0200; playload++;//Playload variable, self-increment, play data from SDRAM. if(playload==3)//If playload=2, stop playing data from SDRAM. playload =0;//PF9 toggled off from playing data (song) from SDRAM, LED5 off. Buffl=pSDRAM_open;//Buffl pointer set back to first space in SDRAM. }

ISR.c FlagA Continued if (*pFIO_FLAG_C == 0x0400)//PF10 switch. { *pFIO_FLAG_C = 0x0400; fast++;//fast variable, self-increment, play data from SDRAM. if(fast==3)//If fast=2, stop playing data from SDRAM. fast=0;//PF10 toggled off from playing data (song) from SDRAM, LED6 off. Buffl=pSDRAM_open;//Buffl pointer set back to first space in SDRAM. } if (*pFIO_FLAG_C == 0x0800)//PF11 switch. { *pFIO_FLAG_C = 0x0800; slow++;//Slow variable, self-increment, play data from SDRAM. if(slow==3)//If slow=2, stop playing data from SDRAM. slow=0;//PF11 toggled off from playing data (song) from SDRAM, LED7 off. Buffl=pSDRAM_open;//Buffl pointer set back to first space in SDRAM. }

Main.c //The *Buffl is a variable interger for the Buffl pointer. int *Buffl; // The ptr is a variable for pointer for fast. int *ptrf; // The ptr is a variable for pointer for slow. int *ptrs; //The openload is a variable for the PF8 to load the data (song) into SDRAM. int openload=0; //The playload is a variable interger for the PF9 to play the data (song) from SDRAM. int playload=0; //The fast is a variable interger for the PF10 to play the data (song) faster from SDRAM. int fast=0; //The slow is a variable interger for the PF11 to play the data (song) slower from SDRAM. int slow=0; //The x is a variable interger for the fast and slow equations. int x=0; //The a is a variable interger for the slow play back "for loop". int a=0; short ChannelLeftOut; short ChannelRightOut;

Talkthrough.h  Symbolic constants #define pSDRAM_open (unsigned int *)0x //SDRAM begining address for pointer. #define pSDRAM_end (unsigned int *)0x01FFFFFF//SDRAM end address for pointer. // two minutes and fifty-five seconds of storage.  Global variables void Init_SDRAM(void); extern short ChannelLeftOut; extern short ChannelRightOut extern int i; extern int *Buffl; extern int *ptrf; extern int *ptrs; extern int openload; extern int playload; extern int fast; extern int slow; extern int x; extern int a; extern short ChannelLeftOut; extern short ChannelRightOut;  Prototypes void Init_SDRAM(void);

Results  Pressing PF8 loads the data (song) into the SDRAM, LED4 comes on; it stops at the end of the SDRAM space/or second press, LED4 goes off, and the point goes back to beginning.  Pressing PF9 plays the data (song) back from the SDRAM exactly as it was played in, LED5 comes on; it stops at the end of the SDRAM space/or second press, LED5 goes off, and pointer goes back to beginning.  Pressing PF10 plays the data (song) back from the SDRAM at a faster speed, LED6 comes on; press the button a second time to stop, LED6 goes off, and pointer goes back to beginning.  Pressing PF11 plays the data (song) back from the SDRAM at slower speed, LED7 comes on; press the button a second time to stop, LED7 goes off, and pointer goes back to beginning.

Questions?

References  Dr. Keputska’s web page   Dr. Kepuska’s class slides