16F628 without Max232


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2005
    Posts
    49

    Question 16F628 without Max232

    hello i am trying to send "hello" without Max232 IC , i am getting characters like this
    *ë©::
    *ë©::
    *ë©::
    *ë©::
    *ë©::
    i am useing 16F628 with 4 MHz Xt
    and the codes re

    RCSTA=$90
    TXSTA=$25
    SPBRG=103
    loop:
    hserout ["hello",13,10]
    pause 500
    goto loop
    end

    am i making a mistake?
    Asking is not a shame but not learning is a SHAME!!!

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    if you don't se any inverter like MAX232, you can't use HSEROUT. you'll need to use SEROUT or SEROUT2 and set it to XYZbaudrate AND Inverted mode.

    If you plan to send data to your PC without any Max232, better if you, of course, use a current limiting resistor between PIC and PC AND make sure the Serpin is set to high level before sending the first data. This will avoid to have odd result on the first sent character.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    The other option is to use the DEBUG command. Its very similar in command struction to Hserin/Hserout. Hserout or Hserin will require a MAX232.

  4. #4
    Join Date
    May 2005
    Posts
    49


    Did you find this post helpful? Yes | No

    Red face Thanks it's working

    Yesssssss
    When i change the codes like this it works

    include "modedefs.bas"
    loop:
    serout portb.2,4,["hello"]
    pause 500
    goto loop
    end

    Thanks all of u for help
    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. SERIN2 not working with 16F628
    By d1camero in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th May 2004, 20:37

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