+ Reply to Thread
Results 1 to 4 of 4

Thread: how to send data using serial port

  1. #1
    sohagiut Newbie
    Join Date
    Feb 2008
    Posts
    23

    Default how to send data using serial port

    how can i send data from pc tp mic-controller using serial port. can i use Hyperterminal. how?


  2. #2
    futz Excellent futz Excellent futz Excellent futz Excellent futz Excellent futz Excellent futz Excellent
    Join Date
    Sep 2007
    Location
    Vancouver, B.C.
    Posts
    1,980

    Default

    Quote Originally Posted by sohagiut
    how can i send data from pc tp mic-controller using serial port. can i use Hyperterminal. how?
    Connect the MCU to the PC with a level shifter (MAX232 or other method). Write a program for the MCU to receive RS232 and do something with the data it receives so you'll know something happened. Set up Hyperterminal to match the baud rate and other stuff that you programmed the MCU to receive (typically you'll start at 9600-8-N-1. Go faster later, after you get that working).

    And that's it. If you're a newb, it's not near as simple as I make it sound, but not so very difficult either.
    Last edited by futz; 19th February 2008 at 05:30 PM.
    =========================
    Futz's Microcontrollers & Robotics
    =========================

  3. #3
    monkeybiter Good monkeybiter Good
    Join Date
    Oct 2006
    Location
    doncaster, u.k.
    Posts
    200

    Default

    it's easy with visual basic and mscomm, once you get your head round it. if that's what you don't forget mscomm will only accept ascii characters for output, so you must convert data to bytes and send using 'chr$(n)'.

    that's assuming you have the neccessary hardware set up [rs232 interface for uC]

  4. #4
    futz Excellent futz Excellent futz Excellent futz Excellent futz Excellent futz Excellent futz Excellent
    Join Date
    Sep 2007
    Location
    Vancouver, B.C.
    Posts
    1,980

    Default

    Here's a link to a thread where I set up my Junebug 18F1320 to do RS232 with a PC:

    Junebug users - fun little diag program for ya

    There's a couple photos and some asm code there.
    =========================
    Futz's Microcontrollers & Robotics
    =========================

+ Reply to Thread

Similar Threads

  1. Need some help with a code provided by ATMEL
    By ikalogic in forum Micro Controllers
    Replies: 1
    Latest: 23rd January 2007, 03:46 PM
  2. z8 emulator and seiko m1632 lcd interfacing
    By whenitz in forum Micro Controllers
    Replies: 12
    Latest: 26th September 2006, 09:56 PM
  3. QBasic Serial Port Control
    By DigiTan in forum Micro Controllers
    Replies: 3
    Latest: 6th January 2006, 12:32 AM
  4. Serial port
    By Riyazahmad in forum General Electronics Chat
    Replies: 6
    Latest: 28th May 2005, 10:37 PM
  5. PIC16F84A, Problems capturing serial data using CCS compiler
    By Jkenyo10 in forum Micro Controllers
    Replies: 0
    Latest: 21st April 2004, 04:18 PM

Tags for this Thread