Deryck Burgess

Can't get QB4 to work with internal oscillator or external

Discussion created by Deryck Burgess on Mar 7, 2006
Latest reply on Mar 10, 2006 by Deryck Burgess
I am a newbie and I believe that the assembler program I wrote to toggle the PortB output pins works.  I believe this since I used P&E Cyclone Pro in HC08 debugger mode and ran the code and it produced a square wave as I expected on the PortB pins,  I then tryed to run it on a prototype board and it won't produce any output on the PortB pins.  I have checked to ensure that there is power and ground supplied.  I also have the reset pin tied High and the IRQ pin tied high through external pullup resistors.  I have also got the Ceramic and Tanalum bypass Capacitors  on VDD.
 
When I ran the code on the P&E Cyclone Pro I got a square wave with a period of 40 usec.  20 usecs high and low.  Here is my code that I used.
 
        org   START
 
****************************************
           rsp
        
test4     lda   #%11111110
            sta   PORTB   ;
        
        
test5     sta   COPCTL
            lda   #%11111110
            sta   DDRB    ;PTB,5 is output because NC
        
            LDA PORTB
TEST7  EOR #%11111110
            STA PORTB; toggle portb output         
            BRA   TEST5
Your help would be much appriciated  

Outcomes