|
|
|
16F877 UART Help!!!
|
|
Date: 2007/11/11 20:27
|
By: Gypo
|
Status: User
|
|
|
Karma: 0  
|
|
| Posts: 2 |   | |
|
Hi
Please forgive my first post being a dire plea but I am very frustrated...
I am trying to move from using 16f84 and 16f628 pics, I started using the 628 to call several telephone numbers and send text messages from a GSM module using RS232, which seemed to be going well.
I got the 628 working in sending a text and making calls with the GSM but the 628 is now limiting other things I want to do, so I wanted to try using the RS232 port on a 18F4550 and / or a 16F877 (starting with the 877).
I have read the datasheets a million times and I have tried many example programs on the net but none seem to work because either they are in C or Basic, I only work with assembly at the moment or because I have to make drastic changes to them. None seem to work as is.....
All I need to start with is code to set up the uart on a 16F877 and to transmit one byte from one memory location and to receive a byte into another memory location. Simple as that... No waiting for a character either way I can do all that I think..
I did come up with this to send a character (attached ASM file) but it doesn't work, can anyone help me please??? The start and interrupt code is from the basic template from microchip... As I have not used it yet but may want to I have left it in for now... The hardware / circuit is simple and works OK, I can do almost anything else with it. It has a MAX232 connected to the PIC RX & TX pins It has a 4Mhz xtal as it's clock It has a LED attached to Port A,0 which I light just to show it's running... I use a Microchip ICD2, several boards with ICSP connectors to program the pics, and on occasions a JDM programmer
Thanks for looking Gypo
Post edited by: Gypo, at: 2007/11/11 20:28
|
|
|
|
|
Re:16F877 UART Help!!!
|
|
Date: 2007/11/23 11:37
|
By: dariog
|
Status: User
|
|
|
Karma: 6  
|
|
| Posts: 107 |   | |
|
Well, the way you got it working on a 628 should work all the same on a 877, with just a few changes (CONFIG bits for first, and I also seem to remember the Baud Rate definitions, and the TRIS bits for TX/RX). Using a 18F you could go with C, makine life easier.
|
|
|
|