sending data to usart of a pic18f452


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2009
    Posts
    3

    Exclamation sending data to usart of a pic18f452

    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.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    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...
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default

    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.
    Charles Linquist

  4. #4
    Join Date
    Jan 2009
    Posts
    3

    Default

    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

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default

    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.
    Charles Linquist

  6. #6
    Join Date
    Jan 2009
    Posts
    3

    Default

    Do you know how to send the ATCommands to the gprs modem using c?

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default

    This is a PBP forum. There are plenty of 'C' forums. Google is a good start.
    Charles Linquist

  8. #8
    abdulmajid's Avatar
    abdulmajid Guest

    Default looking for assembly pro.

    Quote Originally Posted by Safraz_51 View Post
    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]

  9. #9
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default

    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.
    Charles Linquist

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 03:39
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts