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.

help with pic16f877a Serial Communication programming using assembly language MPLAB

Status
Not open for further replies.

luigi_moran23

Newbie level 5
Newbie level 5
Joined
Mar 4, 2013
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,365
Hi! Is there someone out there who can help with my problem? My problem is I want to send a number from the computer to pic16f877a using assembly language program and vice versa . I am also want to use the pickit2 as a UART. Was this possible? If possible, can you at least send me a program that does like this in assembly language: RB0 will on if "1" is sent from computer to microcontroller, and RB1 if 5V is apply the computer will recieve a "2" coming from the microcontroller. Please Help me. Thanks.:)
 

Hi,

Yes you can do it with Assembly and you can use your Pk2 Usart Tool to act as the PC terminal.

You first have to know what frequency crystal you are using the the 877A, this is because the Usart has to be set up based on that.

You can learn how to use the Usart in this tutorial , the last entry 7.7 is based on the 876/877A chip so it should work ok if you adjust it for your crystal.
http://www.winpicprog.co.uk/pic_tutorial7.htm

If you are stuck post the code you have done detailing what the problem is.


Below is a screen shot of my 18F code working the Usart tool.
 

Attachments

  • 2013-03-10 20_07_19-Program Manager.jpg
    2013-03-10 20_07_19-Program Manager.jpg
    164.1 KB · Views: 107

Hi,

You can use this program to test your hardware / Pk2 USART Tool

It connects to your Usart port , and when a '1' is sent to the pic , portC,0 turns on for 4 seconds. All other characters are ignored.
Based on a 4 mhz crystal.
 

Attachments

  • usart.zip
    283 bytes · Views: 91

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top