16F877a PORTA ADC and digital help


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Ok fine,

    Understood, so PORTB has only the weak pull-up feature ?

    another question concerning HSERIN

    I'm using a 16f877 with max 232 at 4mhz

    I'm having problems reading multiple variables in 1 serin string
    It works, but after some times it hangs so I think there is a buffer overflow
    What worries me is that when i measure with an osciloscope, there are pulses on portc.7 the UART RX even with no max232 chip connected ???

    Here is a part of the code:

    DEFINE HSER_RCSTA 90h ' enable serial port,
    ' enable continuous receive
    '
    define HSER_TXSTA 24h ' enable transmit,
    ' BRGH=1
    '
    define HSER_SPBRG 103 ' set baudrate to 2400
    DEFINE HSER_CLOERR 1 ' automatic clear overrun error

    TRISB = %00000000
    'OPTION_REG.7 = 0 ' Enable PORTB pullups
    TRISC = %10000000
    TRISD = %00001111
    TRISE = %000

    loop:
    Hserin 500,LCD,[wait ("TAR"),dec3 var1,wait ("ANT"),DEC3 var2,wait ("AUX"),DEC3 var3,wait ("EXT"),DEC3 var4]


    LCD:
    pause 10
    Lcdout $fe, 1 ' Clear screen

    Lcdout "VAR1: ",#VAR1," VAR2: ",#var2

    Lcdout $fe, $c0, "VAR3: ",#VAR3," VAR4:",#VAR4

    Goto loop

    Any Idea ?

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Hi RF,

    I do not have much experience in serin/serout commands.

    I may mislead you with some incorrect or never tried advices.

    But, at first look, I am not sure whether you can use more then one "WAIT" in one serin command or not.

    I believe another member with valuable and reliable Serin/Serout experiences will respond.

    ----------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. Replies: 5
    Last Post: - 16th October 2009, 18:29
  2. Can't get ADC to loop
    By TravisM in forum mel PIC BASIC
    Replies: 2
    Last Post: - 11th October 2009, 15:33
  3. 16F877A problem: "coupled" digital values
    By Lupo83 in forum General
    Replies: 16
    Last Post: - 4th December 2007, 12:46
  4. Replies: 4
    Last Post: - 24th January 2007, 22:20
  5. Problem with ADC
    By savnik in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 25th November 2006, 07:37

Members who have read this thread : 0

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