PIC to serial with visual basic


Results 1 to 8 of 8

Threaded View

  1. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mbw123 View Post
    Yeah, I switched it to 2400 baud rate and turned off the handshake. Maybe the visual basic code is wrong or the code on the PIC should be "if OK = 4" instead of 4 being in quotation marks. Or am I missing something that's staring me in the face?

    Thanks for the help.

    -Mike
    Try this. It echo's everything you type on hyperterminal, but echo the same character 3 times and toggle the led every time you hit a key, that way you know it's really working..

    Include "modedefs.bas"
    DEFINE OSC 4
    rx var portc.7 : output rx : tx var portc.6 : input tx
    led var portd.2 : output led : serialdata var byte : ADCON1 = $F
    main:
    toggle led 'just show the program is running
    serin rx , N2400 , serialdata
    serout tx , n2400 , [ serialdata , serialdata , serialdata ]
    goto main


    Once again, you break it down, make it super simple, then build it back up...
    Last edited by skimask; - 31st March 2007 at 03:29.

Similar Threads

  1. Serial VB 2005 pic 16f877a problems
    By Snap in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 8th July 2013, 01:52
  2. serial to PIC
    By kindows in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 14th July 2009, 14:58
  3. Replies: 11
    Last Post: - 12th July 2008, 03:36
  4. vb6 to pic basic
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th December 2005, 02:56
  5. Serial communication PIC to PIC help.
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th January 2005, 16:45

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