LCD Data on portA and portB


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dwayne
    Thanks bud!
    You are welcome!
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  2. #2
    hansknec's Avatar
    hansknec Guest


    Did you find this post helpful? Yes | No

    Default

    Do I like my C compiler? Well it has its advantages in many situations, but I still love PBP.
    Try doing this in basic:
    Code:
    /////////////////////////////////////////////////////////////////////////
    ////                 Polarization analysis.C                         ////
    ////                                                                 ////
    ////  This program shows input, output and standard operations with  ////
    ////  floating piont numbers.  I/O is RS232.                         ////
    ////  The equation is applied to the numbers entered and the result  ////
    ////  is printed to the screen.               hansknecht 5/12/04     ////
    /////////////////////////////////////////////////////////////////////////
    
    #include <16F877.h>
    #fuses HS,NOWDT,NOPROTECT,NOLVP
    #use delay(clock=20000000)
    #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
    #include <stdlib.h>
    #include <input.c>
    #include <math.h>
    
    void main()
    {
     float a, b, pol_res;
    
     do {
            printf("\r\nEnter first number: ");  //prompt user for number
            a=get_float();                       // bring number in
    
            printf("\r\nEnter second number: ");  // prompt for second number
            b=get_float();
    
            pol_res = (2*(SQRT (a*b))/(a+b))* 100;  // perform calculation
    
            printf("\r\nPolarization = ",pol_res, " %"); // display result
    
        } while (TRUE);
    
    }
    I also like the wizard associated with the CCS C compiler. When you start a new project it asks you questions like "Do you want to use the on-board ADC?" or "Do you want to use the Capture-Compare?". Based on your answer it automatically inserts the necessary code for initialization.

    All this comes at a $$$ price. PBP is a great affordable compiler for 90% of my projects.

    -John

Similar Threads

  1. Matrix Keypad routine
    By mister_e in forum Code Examples
    Replies: 134
    Last Post: - 18th September 2022, 20:30
  2. PICs can do more if use others than delays instructions
    By hardcore in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th February 2010, 19:52
  3. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 5th May 2005, 23:29

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