Menu

Memory in pics

2020-01-02
2020-01-03
  • Jim giordano

    Jim giordano - 2020-01-02

    How does the "Program Flash Memory" specified in the data sheets relate to the number of Program memory words reported by the GCB compiler?

    e.g. in a 16F18325, the data sheet says there is "14K Program Flash Memory", but when one compiles a program, GCB reports "Program Memory: xxxx/8192 words".

     
  • David Stephenson

    It's got 14K bytes, but the word size is 14 bits (each instruction is 14 bits long). So that comes out to 8192 words.

     
  • Jim giordano

    Jim giordano - 2020-01-03

    Well gee, that's not confusing at all :~ Thanks.

     
    • stan cartwright

      stan cartwright - 2020-01-03

      ha!ha! obvious really :)

       
    • stan cartwright

      stan cartwright - 2020-01-03

      14 bits...where the other 2 bits go?
      It has been "explained" on the forum Jim..er..sort of.
      edit In gcb you don't worry about it,you just use a pic/arduino with lots of mem..er..ram..er program mem...er. The lot and don't worry.

       

      Last edit: stan cartwright 2020-01-03
      • Chris Roper

        Chris Roper - 2020-01-03

        The other 2 Bits never existed.
        It is a 14 bit word and the silicon Mask is only etched with 14 Bits per Location.
        The Common sizes are 4 Bits, 8 Bits, 16 Bits and 32 Bits but there is no reason why 12 Bit and 14 Bits (both of which are in common use) should not exist.

         

        Last edit: Chris Roper 2020-01-03
  • stan cartwright

    stan cartwright - 2020-01-03

    See Jim. Told you it was easy.

     
  • stan cartwright

    stan cartwright - 2020-01-03

    See Jim. Told you it was easy.

     
  • Jim giordano

    Jim giordano - 2020-01-03

    The documentation should say Program memory: 8K instructions, not 14K bytes.

     
    • Chris Roper

      Chris Roper - 2020-01-03

      That is probably how the Engineers wrote it, but it passed through the Marketing department on the way to the lawyers.
      The days of Technical Documents being honest is long gone unfortunately

       

      Last edit: Chris Roper 2020-01-03
  • Jim giordano

    Jim giordano - 2020-01-03

    And thus the real answer to my original question :)

     
  • stan cartwright

    stan cartwright - 2020-01-03

    Hope we are having a laugh here cos I don't understand micro controller spec.
    I have never ran out of memory since using gcb. Shows how well compiled gcb progs are I suppose but I don't use chips with little memory of whatever, I don't use eprom mem.
    Cheap as chips or via versa

     
  • stan cartwright

    stan cartwright - 2020-01-03

    I think an instruction is 14 bit...every one?
    Microconrollers are not z80 or 6502 ... but the point of gcb is you don't worry about that,serious.

     
    • Chris Roper

      Chris Roper - 2020-01-03

      Program instructions vary in bit-count by family of PIC, and may be 12, 14, 16, or 24 bits long.
      GCBASIC specificaly targets the 12 and 14 bit Instruction sizes. The 16 and 24 bit devices being dsPIC33 and PIC24 devices not supported by GCBASIC. There is also the PIC32 but that uses a MIPS Core and a totaly different instruction set. The PIC 32 can be programmed with the C++ compiler.

       

      Last edit: Chris Roper 2020-01-03
  • David Stephenson

    The 18F devices have 16 bit words. I often use the vacant memory as a "datalogger" so the 18Fs will hold a 16 bit word which can sometimes be more useful than a 14 bit word on the 16F devices.

     

Log in to post a comment.