PDA

View Full Version : Two PIC16F84As Serial communication



tredgrave
- 8th April 2012, 22:46
I'm trying to communicate two PIC16f84As serially but I don't know why it does not work. I don't really know much about pic programming and this is the first time i tried to communicate two of them. I'm building an RC but I've tested them first using a wire that connects the transmitter's output to the receiver's input. The receiver still doesn't produce an output despite being synchronized with the transmitter. Attached to this message are the codes(assembly) i've made for the transmitter and receiver using MPLAB. Can someone please help me and tell me at what part was I wrong? I would really appreciate it. Thanks.63816382

mister_e
- 9th April 2012, 15:46
You really want to get rid of those 16F84 in 2011, they are obsolete since over a decade
you really want to use a PIC with a built-in USART, specially when dealing with assembler
you really want to use the right forum for assembler, unfortunately, here we use Melabs PICBasic, which make most of the task soooo simple.

However, here's Microchip forum for any assembler help
http://www.microchip.com/forums/

And then, Melabs PicBasic link, in case you wanted to test-drive it ;)
http://pbp3.com/download.html

tredgrave
- 9th April 2012, 18:52
Ok. Thanks a lot. I'm gonna look into your link and try that PICBasic. Damn. 16f84s are still in mass production here. I feel like a caveman. Hehe. But still I'm wondering, do you think it's possible to communicate 2 of those serially with a well written program? And what PIC do you suggest I use? I've read people suggesting PIC16f628 in forums. Is it good? Thanks again. I really appreciate your reply.

mackrackit
- 9th April 2012, 20:28
Using PBP and the SERIN2/SEROUT2 any two MCUs can communicate.

As for what MCU to use it depends on the scope of your projects. If you ever want to do USB for example you would want to go with something in an 18F...

Demon
- 10th April 2012, 06:35
... I've read people suggesting PIC16f628 in forums. Is it good? ...


I started out with the 16F628 and thought it was excellent. I moved up to the 16F877 when I needed more pins, and then 18F4550 for USB.

Now it looks like I'm going to be a big fan of the 18F2x/4xK22 series (internal 64MHz); unless someone shows me a better, cheaper all-around series.

Supply is not a problem in Canada for any PIC, you may have different availability in your country.

Robert

mister_e
- 12th April 2012, 04:23
16F628 still a fair choice, 16f88 still really fine too, 18F1320 & so forth. But yeah, in some country we heard it's a bit harer to get some PIC model.

tredgrave
- 13th April 2012, 07:32
Ok. Thank y'all. I appreciate it.