User Configuration Interface in PBP


Closed Thread
Results 1 to 2 of 2
  1. #1
    Radiance's Avatar
    Radiance Guest

    Default User Configuration Interface in PBP

    Hello,

    Has anyone ever had the need to build a simple "configuration interface" to their PBP program? I have the need to build a simple configuration interface that allows the user to change some of the parameters used in calculations, ie. alarm setpoints, etc. using the WRITE or WRITECODE command. The interface will be used infrequently, usually only once or twice to set up the device and test. I'm thinking about a simple RS232 terminal type app that the user will just connect to via their favorite terminal app and a serial cable.

    Any experiences with this type of interface? I can see it being a little tricky to break into the "setup routine" by having to Serin a pin constantly for data or maybe an interrupt on one of the other rs232 signal lines?

    Opinions and suggestions welcome.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I've had that need on just about everything I've done. The easiest way to service the request is to use the USART, when you get an interrupt, transfer to the receive routine, verify that the request was valid, and make the change in EEPROM. Then, send a response to let the user know it was succesfull, and it's done.

    This requires a known sequence of bytes being sent by the computer. Not gonna happen with hyperterminal. A small setup program written in Vbasic, Delphi, C or whatever is the easiest way to do it.

    If you want to use hyperterminal to do it. You'll have to essentialy write a Server routine on the PIC. This can take up a lot of code space, and a lot of your time as well. Since hyperterminal let's you input anything you want, idiot proofing the routine is the biggest part of it.

    With your own setup program, there's just a few edit boxes that the user can enter numbers in, then when they hit send, the exact sequence of commands is sent to the PIC. Verifying that the numbers were correct is much esier to do on the PC. It can also add header bytes, so the PIC can more easily verify that the command is valid.

    Best regards,
    Darrel

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  3. Some initial help for a first time PBP user
    By jtburnham in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th April 2006, 07:32
  4. New PBP user
    By J. Mark Wolf in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 3rd November 2005, 07:06
  5. Graphical user interface
    By rocky79 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th October 2005, 12:25

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