pic16f877 problem repeating serial data


Closed Thread
Results 1 to 3 of 3
  1. #1
    TomRiddle's Avatar
    TomRiddle Guest

    Exclamation pic16f877 problem repeating serial data

    ok.. i have here a pic16f877a ... and i'm trying to send this hex commands to the serial port... FF 03 00 01 02 FA

    the program sends the hex strigs... but it sends it more than 1 time... it sends..
    FF 03 00 01 02 FA FF 03 00 01 02 FA FF 03 00 01 02 FA

    is there a way to just.. send the hex string once and then stop the serial communication??
    10x in advance.. here's my code

    DEVICE = 16F877
    XTAL = 4
    DECLARE SERIAL_DATA 8
    LOOP:
    SEROUT PORTA.0 , 16468 , [ $FF, $03, $00, $01, $02, $FA ]


    DELAYMS 3000
    GOTO LOOP

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

    Default

    Take the SEROUT out of the loop. Add a button or something so when it is pushed then send data.
    Dave
    Always wear safety glasses while programming.

  3. #3
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by TomRiddle View Post
    DEVICE = 16F877
    XTAL = 4
    DECLARE SERIAL_DATA 8
    DELAYMS 3000
    And try the correct forum.
    You'd have a heck of a time trying to get the above lines to compile with melabs PicBasic or PicBasicPro.

Similar Threads

  1. Raw serial data sniffer? By USB??
    By kevj in forum General
    Replies: 1
    Last Post: - 5th July 2008, 14:34
  2. Serial data problem
    By The Master in forum General
    Replies: 11
    Last Post: - 2nd December 2007, 03:24
  3. Replies: 4
    Last Post: - 2nd March 2007, 06:12
  4. Yet another RF Serial Data Question
    By Squibcakes in forum Serial
    Replies: 1
    Last Post: - 23rd November 2005, 21:17
  5. 16F877, DS18S20 and Serial Comm Problem
    By YellowTang in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th April 2004, 10:36

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