Do i have to use max232??


Results 1 to 10 of 10

Threaded View

  1. #7
    Join Date
    May 2005
    Posts
    49


    Did you find this post helpful? Yes | No

    Thumbs down Please Look At This!!!

    I really don't undestand in proteus simulation program it say's it is working i set up the circuit in the real world and it is not working i looked every connection and there is no mistake it must work 16F628 and 16F877 are working 4 mhz i remove the mclr resistors and i put resistors to the serin and serout pins that has been connected to the ground i use little commands. I do everything that u write or another friend write or PBP manuel or another book writen in Turkey.I am losting my hope
    PLEASE LOOK AT THE PICTURES.
    ''''''''''''''''''16F628 PROGRAM CODES
    include "modedefs.bas"
    define CHAR_PACING 100
    CMCON = 7
    TRISA =%11111111
    b0 var byte
    b0=0
    COUNTER var word
    COUNTER = 0
    b1 var byte
    b1 =0
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 0
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 3
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    sil:
    COUNTER=0
    lcdout $FE, 1
    lcdout "COUNTER=" , #COUNTER
    lcdout $fe,$c0
    lcdout #COUNTER

    loop:
    serin portb.1,5,10,kontrol,B0
    if b0=1 then goto ok
    goto kontrol
    goto loop

    kontrol:
    button porta.4 ,0,0,0,b1,1,goster
    goto loop

    goster:
    COUNTER = COUNTER + 1
    lcdout $FE, 1
    lcdout "COUNTER=",#COUNTER
    goto loop

    ok:
    pause 20
    serout portb.2,5,[#COUNTER,13]
    lcdout $FE, 1
    lcdout "COUNTER=" , #COUNTER
    lcdout $fe,$c0
    lcdout "SENT!!!"
    pause 1000
    GOTO sil

    end

    '''''''''''''''''''''''16F877 PROGRAM CODES
    include "modedefs.bas"
    define CHAR_PACING 100
    DEFINE LCD_DREG PORTD
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTD
    DEFINE LCD_RSBIT 0
    DEFINE LCD_EREG PORTD
    DEFINE LCD_EBIT 1
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    adcon1=7

    t1 var word
    t1=0

    top var word
    top=0

    basla:

    t1=0
    top=0

    lcdout $fe,1
    lcdout "CHOSE"
    loop:
    if portb.0=0 then goto birinci
    goto loop

    birinci:
    serout porte.0,5,[1,13]
    serin porte.1,5,30,gel1,#t1
    gel1:
    top=t1*10
    lcdout $fe,1
    lcdout "COUNTER=",#t1
    lcdout $fe,$c0
    lcdout #top
    pause 2000
    goto basla
    end
    Attached Images Attached Images   
    Last edited by SuB-ZeRo; - 26th July 2005 at 00:54.
    Asking is not a shame but not learning is a SHAME!!!

Similar Threads

  1. PIC18F4680 to PC via MAX232 (RS232 serial) no output
    By opticsteam1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2008, 20:39
  2. PIC and MAX232 in/out
    By The Master in forum Serial
    Replies: 10
    Last Post: - 29th March 2008, 20:41
  3. RS232, max232
    By kutsi in forum General
    Replies: 12
    Last Post: - 30th May 2007, 06:39
  4. MAX232 and DB9 connecter
    By Tomas in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 25th March 2006, 16:02
  5. MAX232 Level Converter
    By HarryK in forum General
    Replies: 2
    Last Post: - 8th March 2005, 08:25

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