datalogging from pic16f877a to usb-stick


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by arie View Post
    I did make some pic projects by myself, but this is the first time I use serial communications. Hserin and hserout works perfectly with pic to pc. But i can't get serin and serin2 etc to work properly. Could it be that I use a bootloader so there must be an extra code inserted in pic basic pro just like lcd and bootloader
    Well then, let's see some code. That's what we're here for...

  2. #2
    Join Date
    Apr 2007
    Posts
    5

    Default

    I tried it without an bootloader and programmed th pic16F877A with an usb programmer this works ok! Does anybody know how to get the stuff working with a bootloader I use the bloader from sparkfun

    this is the code that works only if you not program it with a bootloader
    FLAGS=0
    DEFINE LOADER_USED 1
    DEFINE OSC 4
    Define __16F877A 1
    DEFINE LCD_DREG PORTD
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTD
    DEFINE LCD_RSBIT 2
    DEFINE LCD_EREG PORTD
    DEFINE LCD_EBIT 3
    DEFINE LCD_BITS 4
    define CHAR_PACING 1000

    Include "modedefs.bas"

    pause 500
    LCDOUT $FE, 1

    TRISA = %00000000 'porta = output'
    TRISB = %00000000 'portb = output'
    TRISC = %10000000 'portc.7 = input'
    rx var PORTC.7
    tx var PORTC.6



    but0 var portc.0
    but1 var portc.1
    but2 var portc.2
    but3 var portc.3
    led0 var portb.0
    led1 var portb.1
    led2 var portb.2
    led3 var portb.3
    led4 var portb.4
    led5 var portb.5
    led6 var portb.6
    led7 var portb.7
    backl var porte.0

    high backl

    main:
    serout2 portc.6, 813, ["hello world", 10, 13]
    goto main



    goto main



    I really appreciate it that everybody is so helpfull cause the simple things are sometimes though to crack! When I'll receive my dosonchip and gps receiver I'm going to test it a lot. Now I'm just doing research to everything I need to use in my project.

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 14:43
  2. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 21:17
  3. Replies: 0
    Last Post: - 6th March 2009, 08:52
  4. Usb X Pic16f877a
    By LLEEDD in forum USB
    Replies: 2
    Last Post: - 30th December 2007, 22:52
  5. USB memory stick
    By Demon in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 12th July 2005, 21:57

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