.

http://www.edubilim.com/ana




Ayrıntılar PIC Microcontoller Memory Method Big T
SahiplikDeğer
İsimPIC Microcontoller Memory Method Big T
AçıklamaPIC Microcontoller Memory Method Big Table lookups Tony Nixon says: Table can access 1 to 8178 bytes (assuming max ROM of 8K) Table movlw High(TStart) movwf PCLATH movf OffsetH,W addwf PCLATH movlw Low(TStart) addwf OffsetL,W btfsc STATUS,C incf PCLATH movf OffsetL,W call DoTable movlw High(here) movwf PCLATH ; reset PCLATH here goto here org 0x???? DoTable addwf PCL TStart Retlw d0 etc As an example of how to use it, say you want to output speech data at 5K samples per second. A simple R2R ladder is on PortB. The speech table has 3000 data points Start clrf OffsetH clrf OffsetL SoundLoop ; 200uS loop time = 5000 samples per second movlw High(Table) movwf PCLATH call Table ; get sound data movwf PORTB movlw High(here) movwf PCLATH ; reset PCLATH here incf OffsetL ; add 1 to data pointer btfsc STATUS,C incf OffsetH NoUp movlw Low(d3000) xorwf OffsetL,W btfss STATUS,Z goto SoundLoop movlw High(d3000) xorwf OffsetH,W btfss STATUS,Z goto SoundLoop goto Start ; ; SOUND DATA TABLE 3000 ELEMENTS ; Table movlw High(TStart) movwf PCLATH movf OffsetH,W addwf PCLATH movlw Low(TStart) addwf OffsetL,W btfsc STATUS,C incf PCLATH movf OffsetL,W DoTable addwf PCL TStart DT "Hello. Im Mr Ed" ; plus another 2984 data points end PS: the text wont sound like that coming from PORTB ;-) PPS :if you want an easy way to create a 3000 point data table ready for MPASM see http://www.bubblesoftonline.com/demo/dtimg.html Dmitry Kiryashov [zews at AHA.RU] says: AFAIK it can be done in more straight way. call Dispatcher ; will be ret...
Dosya AdıBağlantı picmicroc187.doc
Dosya BoyutuLink
Dosya Tipidoc (Mime Tipi: link)
Ekleyenadmin
Ekleme tarihi: 07.10.2008 16:13
İnceleyenlerHerkes
Kontrol EdenEditor
İndirme sayısı3 İndirme sayısı
En son güncelleme 07.10.2008 16:14
Anasayfahttp://www.edubilim.com