| Referate | Director web | Adauga link | Contact |

Titlu referat: Achizitii de date cu ajutorul unei interfente SOUNDBLASTER

Nivel referat: liceu

Descriere referat:
Achiziţii de date cu ajutorul unei interfeţe
SOUNDBLASTER
Intoducere
În acest document este descris un program
în C/C++ de achiziţii de date cu ajutorul unei interfeţe SOUNDBLASTER, şi
prelucrarea semnalelor care permit:
calculul funcţiilor de autocorelaţie
calculul funcţiilor de intercorelaţie
Principiul
funcţionării
Programul foloseşte o placa SOUNDLBLASTER
pentru achiziţionarea semnalelor, semnalul analogic (continuu) este convertat
în semnal digital (discret), care este prelucrat de program care realizează
funcţiile cerute.
Cerinţe
Calculator
>386
OS: DOS >6.20 (Win9x,Win
XP,NT,2000)
Placa SOUNDBLASTER
Monitor VGA
Programul a fost testat pe un sistem cu OS:
Win98, SVGA, placa de sunet C-Media Inc.8330 (compatibil SB16), pe acest sistem
programul funcţionează stabil.
Descriere
program
Programul principal 123.exe,utilizează
biblioteca grafică egavga.bgi.Are ca argument 0,1,2:
0
– doar
osciloscop
1
– osciloscop + fct. de
autocorelaţie
2
– osciloscop +fct. de
intercorelaţie
În program sunt utilizate:
IRQ,DMA,VGAPAGEFLIP.etc
Programul foloseşte o placa SOUNDBLASTER
pentru achiziţionarea semnalelor
Semnalul analogic este aplicat la intrarea de
microfon a plăcii SOUNDBLASTER.
Semnalul analogic (continuu) este convertat
în semnal digital (discret) de CAN din placa SOUNDBLASTER. Structura
principial este reprezentat în Figura 1:
Programul foloseşte acest convertor
analog-digital pe 8 biti.(În cazul SB16 acest convertor este pe 16 biţi dar
se poate folosi şi pe 8 biţi)
Transferul de date se face prin
DMA.
Pentru a funcţiona corect pentru placa
SOUNDBLASTER trebuie să fie setat următorii parametrii:
Adresa de bază 0x220
IRQ
5
DMA
1
Programul nu detectează automat setările, dacă placa SOUNDBLASTER are alte
parametrii trebuie modificat fişierul sbaster.h,dma_mem.c
Programarea unităţii DSP (Digital Signal
Processor) din placa SOUNDBLASTER,se face prin porturi.
Porturile
plăcii SOUDBLASTER
Tabel
1:
02x00h         C/MS 1-6 - Data
Port                   
Write       SB Only
02x00h         FM Music - Left Status
Port            
Read        SBPro
02x00h         FM Music - Left Register
Port          
Write       SBPro
02x01h         C/MS 1-6 - Register
Port               
Write       SB Only
02x01h         FM Music - Left Data
Register          
Write       SBPro
02x02h         C/MS7-12 - Data
Port                   
Write       SB Only
02x02h         FM Music - Right Status
Port           
Read        SBPro
02x02h         FM Music - Right
Register Port         
Write       SBPro
02x03h         C/MS7-12 - Register
Port               
Write       SB Only
02x03h         FM Music - Right Data
Register         
Write       SBPro
02x04h         Mixer - Register
Port                  
Write       SBPro
02x05h         Mixer - Data
Register                  
Read/Write  SBPro
02x06h         DSP -
Reset                            
Write       SB
02x08h         FM Music - Compatible
Status Port      
Read        SB
02x08h         FM Music - Compatible
Register Port     Write      
SB
02x09h         FM Music - Compatible
Data Register     Write      
SB
02x0Ah         DSP - Read
Data                        
Read        SB
02x0Ch         DSP - Write Data or
Command            
Write       SB
02x0Ch         DSP - Write Buffer
Status              
Read        SB
02x0Dh         DSP - Timer Interrupt
Clear            
Read        SB16???
02x0Eh         DSP - Data Available
Status            
Read        SB
02x0Eh         DSP - IRQ Acknowledge,
8-bit           
Read        SB
02x0Fh         DSP - IRQ Acknowledge,
16-bit          
Read        SB16
02x10h         CD-ROM - Data
Register                 
Read        SBPro
02x10h         CD-ROM - Command
Port                  
Write       SBPro
02x11h         CD-ROM - Status
Port                   
Read        SBPro
02x12h         CD-ROM -
Reset                         
Write       SBPro
02x13h         CD-ROM -
Enable                        
Write       SBPro
0388h          AdLib - Status
Port                    
Read        SB
0388h          AdLib - Register
Port                  
Write       SB
0389h          AdLib - Data
Register                  
Write       SB
038Ah          Advanced AdLib -
Status Port           
Read        SB16
038Ah          Advanced AdLib -
Register Port         
Write       SB16
038Bh          Advanced AdLib -
Data Register         
Write       SB16
03x00h         MPU-401 - Data
Port                    
Read/Write  SB16???
03x01h         MPU-401 - Status
Port                  
Read        SB16???
03x01h         MPU-401 - Command
Port                 
Write       SB16???
0200h-0207h   
Joystick                               
Varies      SB
Comenzi
DSP
Tabel
2:
003h          
ASP
Status                                         
SB16ASP
004h           DSP Status
(Obsolete)                              
SB2.0-Pro2
004h           ASP
???                                            
SB16ASP
005h           ASP
???                                            
SB16ASP
010h           Direct DAC,
8-bit                                  
SB
014h           DMA DAC,
8-bit                                     
SB
016h           DMA DAC, 2-bit
ADPCM                               
SB
017h           DMA DAC, 2-bit
ADPCM
Reference                     
SB
01Ch          
Auto-Initialize DMA DAC,
8-bit                     
SB2.0
01Fh          
Auto-Initialize DMA DAC, 2-bit ADPCM Reference     
SB2.0
020h           Direct ADC,
8-bit                                  
SB
024h           DMA ADC,
8-bit                                     
SB
028h           Direct ADC,
8-bit
(Burst)                          
SB-Pro2
02Ch          
Auto-Initialize DMA ADC,
8-bit                     
SB2.0
030h           MIDI Read
Poll                                     
SB
031h           MIDI Read
Interrupt                                
SB
032h           MIDI Read
Timestamp
Poll                           
SB???
033h           MIDI Read
Timestamp
Interrupt                      
SB???
034h           MIDI Read Poll
+ Write Poll
(UART)                 
SB2.0
035h           MIDI Read
Interrupt + Write Poll
(UART)            
SB2.0???
037h           MIDI Read
Timestamp Interrupt + Write Poll (UART)   SB2.0???
038h           MIDI Write
Poll                                    
SB
040h           Set Time
Constant                                  
SB
041h           Set Sample
Rate                                    
SB16
045h           Continue
Auto-Initialize DMA,
8-bit                
SB16
047h           Continue
Auto-Initialize DMA,
16-bit               
SB16
048h           Set DMA Block
Size                                 
SB2.0
074h           DMA DAC, 4-bit
ADPCM                               
SB
075h           DMA DAC, 4-bit
ADPCM
Reference                     
SB
076h           DMA DAC,
2.6-bit
ADPCM                             
SB
077h           DMA DAC,
2.6-bit ADPCM
Reference                   
SB
07Dh          
Auto-Initialize DMA DAC, 4-bit ADPCM Reference     
SB2.0
07Fh          
Auto-Initialize DMA DAC, 2.6-bit ADPCM Reference   
SB2.0
080h           Silence
DAC                                        
SB
090h          
Auto-Initialize DMA DAC, 8-bit (High
Speed)         SB2.0-Pro2
098h          
Auto-Initialize DMA ADC, 8-bit (High
Speed)         SB2.0-Pro2
0A0h           Disable Stereo
Input
Mode                          
SBPro Only
0A8h           Enable Stereo
Input
Mode                           
SBPro Only
0Bxh/0Cxh     
Generic DAC/ADC DMA (16-bit,
8-bit)                
SB16
0D0h           Halt DMA
Operation,
8-bit                          
SB
0D1h           Enable
Speaker                                     
SB
0D3h           Disable
Speaker                                    
SB
0D4h           Continue DMA
Operation,
8-bit                      
SB
0D5h           Halt DMA
Operation,
16-bit                         
SB16
0D6h           Continue DMA
Operation,
16-bit                     
SB16
0D8h           Speaker
Status                                     
SB
0D9h           Exit
Auto-Initialize DMA Operation,
16-bit          SB16
0DAh           Exit
Auto-Initialize DMA Operation,
8-bit          
SB2.0
0E0h           DSP
Identification                                 
SB2.0
0E1h           DSP
Version                                        
SB
0E3h           DSP
Copyright                                      
SBPro2???
0E4h           Write Test
Register...



Curs valutar
Euro4,5511
Dolarul american4,2615
Lira Sterlina5,3015
Gramul de aur170,1555
Leul moldovenesc0,2176
Materii referate

Anatomie (61)

Astronomie (61)

Biologie (546)

Chimie (530)

Contabilitate (87)

Design (4)

Diverse (878)

Drept (356)

Ecologie (59)

Economie (520)

Educatie Fizica (2)

Educatie si Invatanmant (2)

Engleza (463)

Filosofie (99)

Fizica (343)

Franceza (25)

Geografie (838)

Germana (40)

Informatica (354)

Istorie (1169)

Italiana (21)

Latina (26)

Literatura (22)

Logica (6)

Management (133)

Marketing (118)

Matematica (114)

Mecanica (13)

Medicina si Farmacie (229)

Muzica (35)

Psihologie (337)

Religie (248)

Romana (2303)

Spaniola (31)

Statistica (17)

Stiinte politice (27)

Turism (64)

Nota explicativa

Informatiile oferite de acuz.net au scop educativ si orientativ pentru cercetare academica. Va recomandam utilizarea acestora doar ca sursa de inspiratie sau ca resurse educationale.