A/D compiler issues


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Location
    Holmfirth England
    Posts
    116

    Default A/D compiler issues

    Hi,

    Ever since I have been using PBP I have had the same problem. If using MPASMWIN the A/D converter module does not work, and just reads zero. In the past this was not a problem as I had the option to use the other compiler, the one where you don't get progress bars during compile.

    Trouble is I now only have 64 bit OS and the old compiler will not work. I have upgraded PBP, and am currently using PBPX3.0.6.4, with micro code studio 5.0.0.3.

    I have a project that uses the A/D converter ,and really need to get it working. Can anyone please help?

    I originaly posted this in the PBP 3 section, but noone is viewing that, so I have posted here.

    Kind regards
    Bob.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: A/D compiler issues

    Hi, Bob

    could you provide some enlightments, please ... one full "faulty" program would be the best.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Feb 2005
    Location
    Holmfirth England
    Posts
    116


    Did you find this post helpful? Yes | No

    Default Re: A/D compiler issues

    Hi Alain,
    Here is the code. PIC16F870 by the way.

    define OSC 20
    define adc_bits 10
    define adc_sampleus 50
    trisa = 255
    adcon0 = 129 'Internal clock, channel 0, switched on
    adcon1 = 142 'Right justified (10 bit), channel 0 analog

    adcin 0, temp
    let temp1 = temp * 3
    let temp2 = (temp * 5) / 100
    let temp = temp1 + temp2
    serout serial1, 2, ["A",#temp,"AA"]

    This exact same program has been working fine for around 4 years. I have always had the same issue. If using the compiler with the popup window with progress bars the A/D does not work (same with many different chips, and projects) if using the other compiler everything was fine.

    I have been using PBP for many years with micro code studio, and have always had the same issue. I no longer have a 32 bit operating system, so I can't even install my older version of PBP, and use the doss compiler. With PBP 3 I only have the option to use MPASMX or not, and both give the same result, the same result that I'v had since PBP 2.4ish.

    Bob.

  4. #4
    Join Date
    Feb 2005
    Location
    Holmfirth England
    Posts
    116


    Did you find this post helpful? Yes | No

    Default Re: A/D compiler issues

    Hi,

    Issue solved. Many thanks to Henrik. The old assembler (PM) was not case sensitive, MPASM is.
    Changed define adc_bits 10, and all of the other config parts to capital letters, and all is fine.

    Sorry about the dual post, but I was getting no replies in the PBP 3 section. If a mod could delete one of them that would tidy things up.

    Kind regards
    Bob.

Similar Threads

  1. A/D, and compiler issues.
    By BobEdge in forum PBP3
    Replies: 4
    Last Post: - 27th March 2014, 13:20
  2. compiler help!!!!
    By MINHLE in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 20th April 2008, 18:52
  3. c compiler
    By Armando Herjim in forum General
    Replies: 2
    Last Post: - 7th March 2007, 03:41
  4. HT-Soft C compiler issues
    By ken_mazur in forum General
    Replies: 1
    Last Post: - 19th October 2006, 14:10
  5. Compiler problems
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 27th September 2006, 13:03

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