Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] interfacing SR04 ultrasonic sensor with 16f877 UART not working

Status
Not open for further replies.

asthra123

Member level 1
Joined
Jul 2, 2013
Messages
32
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,582
hello everybody
please help me because i cant find out the problem in my asm code which is not working with uart tx(txpoll) subroutine . but without "UART TX(TXPOLL) subroutine the code is working fine.
 

Attachments

  • Ultrasonic Sensor with PIC16F877 Assembly Source Code1.txt
    10.6 KB · Views: 59

Hi,

but without "UART TX(TXPOLL) subroutine the code is working fine.
--> Then do it this way.

Klaus
 

hello,

check bank .. for SPBRG & TXSTA using

Code:
    bcf        INTCON,GIE 
        bsf            STATUS,RP0 
    bsf        PIE1,TMR1IE    
        banksel         T1CON                           
        bsf           T1CON,TMR1ON
    
initsci  
       banksel  SPBRG     ;  <-------------------------  bank 1 !  
       movlw  19h         
       movwf  SPBRG
       movlw  25h         ;set up for async operation
       movwf  TXSTA
       bcf    STATUS,RP0  ;back to file 0 for a moment
       movlw  90h         ;enable serial port operations and the associated pins
       movwf  RCSTA
       clrf   TXREG       ;clear our serial port buffers for start up
       clrf   RCREG
       call   init
 
dear paulfjujo......
thank you very much its working......
thankyou for your valuable reply
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top