PDA

View Full Version : sending data to usart of a pic18f452



Safraz_51
- 14th January 2009, 18:13
I need assembly code which samples an analog signal (0-5V) every 5 seconds, convert it via the internal ADC of the pic18f452 and then send this data to the usart to be transmitted to a pc via two gprs modems, on connected to the usart of the pic and one connected to the pc. any ideas? I will be using modbus software (on pc end) to poll the gprs modem connected to the pic.

mackrackit
- 14th January 2009, 20:56
We do not do very much assembly here. Most of the folks here use Pic Basic.
Try the piclist. But I doubt if anyone there will just give you the code, maybe I am wrong...

Charles Linquis
- 17th January 2009, 21:32
This should not require assembly. Unless there is something missing, the task looks almost trivial.

I don't recommend 18F452's for anything, however. This is an old chip design that has some quirks. Choose a more modern PIC with the same footprint.

Safraz_51
- 18th January 2009, 21:36
Mr Charles:
which uC do you recommend. the hardest part of my problem is actually sending AT Commands to the GPRS modem via the usart of the pic. i decided to use c instead. Do you have any suggestions of how to go about doin this?
thanks

Charles Linquis
- 19th January 2009, 00:51
The 18F4520 is a good choice. I send enormous amounts of data through the PICs USART, at up to 115Kbaud, and I have never had any problems with PBP in this regard.

Safraz_51
- 19th January 2009, 16:36
Do you know how to send the ATCommands to the gprs modem using c?

Charles Linquis
- 20th January 2009, 03:55
This is a PBP forum. There are plenty of 'C' forums. Google is a good start.

abdulmajid
- 20th February 2009, 05:23
I need assembly code which samples an analog signal (0-5V) every 5 seconds, convert it via the internal ADC of the pic18f452 and then send this data to the usart to be transmitted to a pc via two gprs modems, on connected to the usart of the pic and one connected to the pc. any ideas? I will be using modbus software (on pc end) to poll the gprs modem connected to the pic.

I look for assembly program pic18F452 that written DTMF "dual tone multi frequencies" any one can help please send me email [email protected]

Charles Linquis
- 23rd February 2009, 16:06
PBP has no problem with DTMF tone generation. The limitation is that the PIC can do virtually nothing else while generating these tones. It can, however, receive up to two bytes of data over the hardware USART while doing other things.