*very* low speed data transfer


Closed Thread
Results 1 to 4 of 4
  1. #1
    jswayze's Avatar
    jswayze Guest

    Default *very* low speed data transfer

    I've got an interesting application that requires a very low-speed data transfer to occur in order to configure code on my PIC (a 16F648A.)

    The PIC software has 70 word-length variables that I'd like to generate from a Visual Basic program on a PC and then download into the PIC. This is a very small, light device and as opposed to coming up with some sort of one-button programming interface, I thought a VB program would be much easier to use.

    I plan to transfer this data by means of one or two phototransistors on my board. The board and phototransistors would be placed up against the monitor and a "programming rectangle" on the computer monitor would transmit the 70 bytes of data by flashing between white and black. I've tested this on a scope, and am able to get a good differentiation between white and black. I plan to use the VREF and comparator to gate the signal.

    My question is, is there a way to use the built-in serial routines to do a very slow data rate, say 30 bps? I think I can only count on 60Hz from the screen, so I'd need to go a bit lower to guarantee a good signal. Has anyone seen this done before?

    I realize this is kind of a clunky option for programming, but it's the one that requires the fewest components (one.) My other thought was to add a serial cable to the package and solder an IR LED to the output. Then I could hold the LED up to the phototransistor and transmit using normal serial routines. This of course requires a cable, connector, solder, etc. and adds cost that I'd like to avoid.

    Thanks for any input,

    Jeff

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


    Did you find this post helpful? Yes | No

    Default

    original way to transfer data, why not using serial COM port instead??

    BTW, you can perform slow serial data... as low as you want. With the built-in... ive got no idea... maybe some trick in the choice of crystal and DEFINE OSC can do something but, i think the easiest way is to build your own.
    Using internal timer ticks for accurate bit testing.

    good luck!
    Steve

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

  3. #3
    jswayze's Avatar
    jswayze Guest


    Did you find this post helpful? Yes | No

    Default

    Yeah, serial port would be a LOT easier, but it would require that I also include a cable with the product... one more thing to buy, package, etc.

    This is definitely my fallback though.

    Jeff

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


    Did you find this post helpful? Yes | No

    Default

    ok, so in this case i suggest build your own serial procedure using internal timer. Maybe interrupts will be an intelligent way to monitor serial comm start bit if your device do something else while receiving data.

    but as i told previously, there's maybe some trick to do with crystal choice.... let's say SERIN @ 300 baud @ 4MHZ... 400KHZ crystal can maybe acheive SERIN @ 30 BAUD with a DEFINE OSC 4

    regards
    Steve

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

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

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