Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

Please accept the use of cookies on our site

At PEmicro we use web browser cookies in order to provide you with an enhanced experience and in order to be able to do things like shopping cart processing and identify you when you login to our website.

Click here to accept

search inside this forum
search inside all forums
Problem with sci (reception)
Juan L. migrated on Dec 31, 2013 at 11:00 AM
No staff assigned yet

  • Hi, i need help with the sci, i can send and receive, but i can´t move the data received to the port B.
    I try turn off the sci and then move to the port B and it works, but if not the port B show 09h (hexadecimal) (PTB1 = 1 ; PTB3 = 1).
    Too i send a character when receipt and i receive 2 characters.
    The connection is between the PC and uC, and use the Termite 2.6 for read the characters that sends the uC

    I´m using the MC908JL8CPE , sorry for my english, and thanks for everything biggrin.gif

    Here attached my code:
          mov          #$01,config1         ;Disable WatchDog          
          mov      #$00,config2        
              mov          #$FF,DDRB                         
          mov      #$40,DDRD            
              clr            PORTB                
          clr              PORTD
          mov      #$03,VAR
    ;***** SCBR: SCP1=0,SCP0=0,SCR2=0,SCR1=1,SCR0=0 *******
          mov      #$02,SCBR            ;Baud Rate register = 9600
    ;***** SCC1: LOOPS=0,ENSCI=1,TXINV=0,M=0,WAKE=0,ILTY=0,PEN=0,PTY=0 *******
          mov      #$40,SCC1             ;Control register 1
    ;***** SCC2: SCTIE=0,TCIE=0,SCRIE=0,ILIE=0,TE=1,RE=1,RWU=0,SBK=0 *******      
          mov      #$0C,SCC2              ;Control register 2 (TE,RE enable)
    ;***** SCC3: R8=0,T8=0,ORIE=0,NEIE=0,FEIE=0,PEIE=0 *******            
          mov      #$00,SCC3     ;Control register 3

          lda            SCS1      
          brclr      SCRF,SCS1,*
          mov      SCDR,VAR          
          mov      VAR,PORTB
          lda              SCS1
          mov      'R',SCDR
          brclr      SCTE,SCS1,*
          jmp      recepcion


Add comment

   Want to comment? Please login or create a new PEMicro account.

© 2018 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement