need help translating this code and

Discussion in 'Embedded Systems and Microcontrollers' started by terramir, Jun 21, 2013.

  1. terramir

    Thread Starter New Member

    Feb 7, 2013
    2
    0
    Need help fixing this code if it needs fixing, I dunno I have a 16F877a laying around and a programmer one of those olimex serial port deals pic-PG2C.
    and I would like to make the capacitance meter described in the source file the only thing I edited so far is the micro controllers name.

    Warning is is long code (801 lines plus warnings) so I linked it from here http://pastie.org/private/ps6ncobussoabwgajjrura the warnings are all on the bottom but I'm putting one here to show what I'm dealing with.

    Message[302] /Users/terramir/MPLABXProjects/capacitormeter.X/piccap.asm 95 : Register in operand not in bank 0. Ensure that bank bits are correct
    this is for a capacitor meter an autoranging one I found on the web but that seems to be not maintained I had to get the source from the way back machine (dead page geocities)
    help
    terramir
     
  2. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    just remove the semi-colon on this line

    and it would assemble without any banksel error message. Or you can ignore the messages. They are just warning. The hex code would work just fine.

    Allen
     
    Last edited: Jun 21, 2013
  3. terramir

    Thread Starter New Member

    Feb 7, 2013
    2
    0
    now the question is will the pinout (while maybe on different pins physically) be the same, i.e. as long as the pins are on the same ports it should be the same right?
    BTW I found links that still work in regards to the project and well from there the code and schematic http://www.radiolocman.com/shem/schematics.html?di=46359
    the links to the schematic and original source work.

    terramir
     
  4. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    The software was written for the 16F873 (28 pin PIC). If you want to use 16F877A (40 pin PIC), it should work too. Just keep the pin name the same, the pin numbers might be different. IIRC, the 877A has extra pins for port D.

    Also don't forget to change the selected PIC from 16F873 to 16F877 & the INC file as well before assembling.

    Code ( (Unknown Language)):
    1.         LIST P=16F877A
    2.         INCLUDE "p16f877a.inc"
    3.  
    Allen
     
Loading...