Loading ...
Sorry, an error occurred while loading the content.
 

[jallist] Re: 16F877, Whats involved?

Expand Messages
  • Snail Instruments
    ... One more important difference between 16F877 and 16F84 - the general purpose RAM begins at 0x20 for F877 but at 0x0C for F84. So we have to convince JAL
    Message 1 of 7 , Jul 2, 1999
      >Maybe you could just compile e0001 from the examples section and
      >se whether the LED blinks at 1Hz? I can send you the hex file
      >(for which Xtal frequency?) but (at least for this one) you could
      >compile the example yourself.

      One more important difference between 16F877 and 16F84 - the general
      purpose RAM begins at 0x20 for F877 but at 0x0C for F84. So we have to
      convince JAL not to allocate variables from 0x0D to 0x1F. This region
      contains special function registers, like the timers and their control
      registers, serial interface (SPI, I2C and USART) registers,
      capture/compare/PWM registers and A/D registers.

      16F877 may (and probably will) behave (seemingly) erroneously, when writing
      those places.

      BTW, there is one nice feature on the 16F877 (among others). It can
      overwrite it's own _program_ memory, making a program download possible. No
      more pulling out chips, no more chip programmers or even UV erasers ;-).
      There is a technical brief note (I think TB026) on the Microchip web site
      somewhere. I didn't check it yet. Just beware that the -ES (engineering
      sample) devices need extra 16 DW 0x3FFF after writting program memory (more
      in errata sheet).

      Josef Hanzal


      ======================================================================
      Electronical devices for chemical laboratory, custom electonics design
      ----------------------------------------------------------------------
      Snail Instruments Josef Hanzal, M. S.
      Vojanova 615 phone/fax: +420-311-24433
      266 01 Beroun e-mail: snail@...
      Czech Republic URL: http://www.vitrum.cz/snail/
      ======================================================================


      ------------------------------------------------------------------------

      eGroups.com home: http://www.egroups.com/group/jallist
      http://www.egroups.com - Simplifying group communications
    • w. v. ooijen / f. hanneman
      ... A quick hack that should work for the current Jal compiler: declare the appropriate number of global variables, do not use them but declare them pragma
      Message 2 of 7 , Jul 3, 1999
        > One more important difference between 16F877 and 16F84 - the general
        > purpose RAM begins at 0x20 for F877 but at 0x0C for F84. So we have to
        > convince JAL not to allocate variables from 0x0D to 0x1F. This region
        > contains special function registers, like the timers and their control
        > registers, serial interface (SPI, I2C and USART) registers,
        > capture/compare/PWM registers and A/D registers.

        A quick hack that should work for the current Jal compiler:
        declare the appropriate number of global variables,
        do not use them but declare them pragma keep var .....
        You'll loose h20 - h0C = 14 registers this way.
        Check the asm output to see whether it produces
        what you want!

        > BTW, there is one nice feature on the 16F877 (among others). It can
        > overwrite it's own _program_ memory, making a program download possible.
        No
        > more pulling out chips, no more chip programmers or even UV erasers ;-).
        > There is a technical brief note (I think TB026) on the Microchip web site
        > somewhere. I didn't check it yet. Just beware that the -ES (engineering
        > sample) devices need extra 16 DW 0x3FFF after writting program memory
        (more
        > in errata sheet).

        I use the 16x84 that way all the time (although it is an in-circuit
        programmer
        that does the programming, not the PIC itself).

        uChip has promised to send me a few f877's, I'll let you know
        when Jal can do something with these new chips.

        Wouter

        ------------------------------------------------------------------------

        eGroups.com home: http://www.egroups.com/group/jallist
        http://www.egroups.com - Simplifying group communications
      Your message has been successfully submitted and would be delivered to recipients shortly.