Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

illegal registers?

illegal registers?

2006-12-26 by Thomas Keller

Here is an example of code I cannot assemble successfully.  Again, it is 
complaining about illegal register names, etc.:

.include "tn15def.inc"

; Define here the variables
;
.def  temp  =r16

; Define here Reset and interrupt vectors, if any
;
reset:
  rjmp start
  reti      ; Addr $01
  reti      ; Addr $02
  reti      ; Addr $03
  reti      ; Addr $04
  reti      ; Addr $05
  reti      ; Addr $06        Use 'rjmp myVector'
  reti      ; Addr $07        to define a interrupt vector
  reti      ; Addr $08
  reti      ; Addr $09
  reti      ; Addr $0A
  reti      ; Addr $0B        This is just an example
  reti      ; Addr $0C        Not all MCUs have the same
  reti      ; Addr $0D        number of interrupt vectors
  reti      ; Addr $0E
  reti      ; Addr $0F
  reti      ; Addr $10

; Program starts here after Reset
;
start:
  nop       ; Initialize here ports, stack pointer,
  nop       ; cleanup RAM, etc.
  nop       ;
  nop         ;

;
;    this table povides the data for the intesnity curve needed for
;    the beacon simlation.  the data represent the value sin3 * 255 for
;    each angle from 0 through 90  at .9 degree increments

TABLE:.db    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 3, 4, 5, 6, 6, 8
     .db    9, 10, 11, 13, 14, 16, 18, 20, 22, 24, 26, 29, 31, 34, 36, 39
     .db    44, 48, 52, 55, 59, 62, 66, 70, 74, 78, 82, 86, 90, 94, 99
     .db    103, 108, 112, 117, 121, 126, 130, 135, 140, 144, 149, 153
     .db    158, 163, 167, 172, 176, 180, 185, 189, 193, 197, 201, 205, 209
     .db    212, 216, 219, 223, 226, 229, 232, 234, 237, 239, 242, 244, 246
     .db    247, 249, 250, 252, 253, 254, 255, 255, 255
    ;

DELAY:

   ld     r31,    0xff                    ; load 255 into temp register
   out r31,    TCNT1                    ; store in timer/counter 1
   ld     r16,    0xff                    ; store 255 into primary counter
   ld     r17,    0x49                    ; store 73  into secondary 
counter

Re: [AVR-Chat] illegal registers?

2006-12-26 by John Samperi

At 09:29 AM 27/12/2006, you wrote:
>    ld     r31,    0xff                    ; load 255 into temp register

That should be LDI (load immediate). ld is only used with
index registers. ie ld   r31,z ;load r31 from **RAM** location pointed to
by Z.

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

What's this IC?

2006-12-28 by praveen kumar

hi frens,
   
  Is anybody know the the IC named P89LPC931F which
  is found on JMY-502 ,contactless smart card reader module 
  along with MF RC500 reader.
   
  I'm not finding the datasheet for these ICs, how can i get these datasheets?
   
  praveen
  pinn@cle 

 Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php

[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.