Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Why do I get the this error - "Read from unprogrammed EEPROM address"
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
alex99  
View profile   Translate to Translated (View Original)
 More options 8 Nov, 16:02
Newsgroups: comp.arch.embedded
From: "alex99" <alex.xande...@gmail.com>
Date: Sun, 08 Nov 2009 10:02:56 -0600
Local: Sun 8 Nov 2009 16:02
Subject: Why do I get the this error - "Read from unprogrammed EEPROM address"
Mu Code for HC12 is given below :

USER_STACKTOP   equ     $0a00   ;just above RAM area
PORTA           equ     $0000   ;Port A register
PORTB           equ     $0001   ;Port B register
PORTP           equ     $0056   ;Port P register
DDRA            equ     $0002   ;Port A Data Direction Register
DDRB            equ     $0003   ;Port B Data Direction Register
DDRP            equ     $0057   ;Port P Data Direction Register
INTCR           equ     $001e   ;Interrupt Control Register
COPCTL          equ     $0016   ;COP Control Register
TIOS            equ     $0080   ;Timer Input Capture/Output Compare Select
TSCR            equ     $0086   ;Timer System Control Register
TCTL1           equ     $0088   ;Timer Control Register 1
TMSK1           equ     $008c   ;Timer Interrupt Mask 1
TMSK2           equ     $008d   ;Timer Interrupt Mask 2
TCNT            equ     $0084   ;Timer Counter
TC7             equ     $009e   ;Timer Input Capture/Output Compare Register 7
TFLG1           equ     $008e   ;Timer Interrupt Flag 1

        org     $0800
start   clr     COPCTL
        lds     #USER_STACKTOP

        movb    #$00,DDRA       ;make Port A all inputs
        movb    #$ff,DDRB       ;make Port B all outputs
        movb    #$00,DDRP       ;make Port P all inputs

        movb    #$00,PORTB      ;clear Port B

        movb    #$80,TIOS       ;Set Timer 7 to output compare
        movb    #$05,TMSK2      ;Prescalar = /32 = 250KHz clock
        movb    #$40,TCTL1      ;Set Timer 7 output to toggle
        movb    #$80,TMSK1      ;Enable interrupt for Timer 7 output compare

                                ;Set up Timer counter to output at 50ms intervals
        ldd     TCNT            ;Load Timer Counter into D
        addd    T7RATE          ;Add T7RATE to D
        std     TC7             ;Store D to TC7H        

        movb    #$80,TSCR       ;Enables timers

        movb    #$C0,INTCR      ;enables IRQ interrupt

        cli                     ;clear interrupt mask - enable interrupts

backgnd nop
        bra   backgnd

Timer7IRQ:
        ldab    TFLG1           ;just to read it
        ldab    #$80            ;clear C7F in TFLG1
        stab    TFLG1
        ldd     TCNT            ;get entire TCNT at time of
                                ;external hi-to-low pulse
        staa    PORTB           ;display hi-order TCNT

        ldd     TCNT            ;Load Timer Counter into D
        addd    T7RATE          ;Add T7RATE to D
        std     TC7             ;Store D to TC7H        

        rti

IRQ_ISR:
        ldab    INT_COUNT       ;load data
        incb                    ;increment data
        stab    INT_COUNT       ;store data
        rti                     ;return from interrupt

        org     $0900    
flags   dc.b    $ff
INT_COUNT dc.b  $00             ;Data element to increment in interrupt
T7RATE  dc.w    $30D4           ;Rate of T7 Interrupts

        org     $0b20          
        dc.w    Timer7IRQ

        org     $0b32
        dc.w    IRQ_ISR    

---------------------------------------        
This message was sent using the comp.arch.embedded web interface on
http://www.EmbeddedRelated.com


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google