Menu

Welcome to Compiler Problems

2006-07-29
2013-05-30
  • Nobody/Anonymous

    Welcome to Compiler Problems

     
    • Nobody/Anonymous

      Program for 12F675 thet commutes two pins for drive a two MOS Transistor for generate 16.666 ms cycle for inverter proposites, compiles well with PROTON basic, do not work with GCBASIC, the two hex files would be very alike but not. what happens??????? thanks in advance for your sure attention. PCURVELO

       
    • Hugh Considine

      Hugh Considine - 2006-10-08

      GCBASIC is different to Proton Basic, so the program will need to be changed a bit. If you post the program here, I'll be happy to change it so that it will work with GCBASIC.

       
    • Nobody/Anonymous

      When I will see added: PULSIN  to Great Cow Basic

       
    • Hugh Considine

      Hugh Considine - 2006-10-19

      I can add it in the next version if you'd like.

       
  • Nobody/Anonymous

    Hi! GCBasic is great.
    I have an issue with pulsin command.
    I use an ultrasonic wave detector (distance sensor) to detect the distance of an object and display it on LCD module.
    The device has 4 pinouts, 1 for power, 1 for ground, 1 for trigger input and the last for echo. I connect trigger pin to portB.3 of pic and echo to portB.4. I use 4MHz oscillator
    the code in pic basic pro is as follows:

    main:
    distance var word
    distinch var word
    xxxx
    xxxx
    sonar:
    pulsout portB.2, 1  '10 micro-second
    puslin portB.3, 1, distance
    distinch = distance / 15

    Then i want to display distinch on LCD module.

    it works fine with picbasic pro,
    But the main program has other codes that exceeds 50 lines so i cant possibly use picbasic pro free version.
    i am just a student so cant afford to buy the software
    i tried GCBasic graphical version and loved it.
    i convert this program to gcbasic as follows:

    sonar:
    PulseOut portB.2, 1  1us
    PuslIn portB.3, distance, 10 us
    but it did not work.

    I have tried with a do loop as follows:

    distance = 0
    do while portB.3 = on
    wait 10 us
    distance = distance +1
    if distance = 0 then exit do
    loop

    it did not work either

    distinch = distance / 15

     
  • Nobody/Anonymous

    compile.bat not find the directory gcbasic

     
  • Bert

    Bert - 2011-08-20

    I have a few suggestions:
    First, it's usually important to understand error messages.  I would ensure that compile.bat contains the directory where gcbaic is installed.
    Second, once the compiler actually runs and compiles what you have typed in, any messages given are usually clues as to where problems may be in your instructions.
    Your gcbasic code says Puslln, but there is no such command in the GCBASIC Command Guide (same for Pulsin).  To get an echo time, consider starting a timer at pulseout, checking the pulsin pin for a change, then stop and read the timer.

    -Bert

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.