AVR .db directive

Buon Giorno a Tutto il NG!!

scusate la domanda da novizio, ma non ho capito come leggere i dati definiti con la direttiva .db, ovvero se scrivo:

.db 5,12,36,49,125,99

in che registro li trovo?, come faccio ad assegnarli....

ho trovato questa routine ma non capisco...... una risposta potrebbe essere, leggiti il datasheet dei vari AVR, ma se qualcuno mi indicasse la via...gliene sarei grato..

MyTable: .DW 0x1234,0x2345,0x3456,0x4568,0x5678 ; The table values, wordwise .DW 0x6789,0x789A,0x89AB,0x9ABC,0xABCD ; organised

Read5: LDI ZH,HIGH(MyTable*2) ; Adress of table to pointer Z LDI ZL,LOW(MyTable*2) ; multiplied by 2 for bytewise access ADIW ZL,10 ; Point to fifth value in table LPM ; Read least significant byte from program memory MOV R24,R0 ; Copy LSB to 16-bit register ADIW ZL,1 ; Point to MSB in program memory LPM ; Read MSB of table value MOV R25,R0 ; Copy MSB to 16-bit register

l'ho copiata e funziona ma non avendo capito come funziona non riesco a trasformarla da .DW a .DB

Grazie

Sergio

Reply to
SergioBS
Loading thread data ...

Oops!, ho "sbagliato" NG!!!

Scusate..

Sergio

"SergioBS" ha scritto nel messaggio news:c6p87j$e8inr$ snipped-for-privacy@ID-201124.news.uni-berlin.de...

definiti

essere,

Reply to
SergioBS

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.