Menu

HEFblockwrite

Help
2016-01-22
2016-01-27
  • David Stephenson

    I notice the new compiler has this new feature which can greatly enhance the amount of data storage.
    There is some information in the help files, but what I would like to know is how do you set the row number to start a write. I presume that you want to avoid overwriting the program code.

     
  • David Stephenson

    So I tried it out using the example from the help files

    #include<heflash.h>
    Dim Hello as String
    Hello="Hello GCB World!"
    HEFwriteBlock(5,Hello,len(Hello))
    

    When I try to compile it I get the following:

    12:02:57 G+Stool-COMPILE/ASSEMBLE, processing C:\GCB@Syn\G+Stools\makeHEX.bat
    Source-File = C:\gcbasic095\conew.gcb
    2.3 Sec. <<< WARNINGs / ERRORs while compiling!
    Doubleclick on errormessage below to go to sourcecode-line:
    Error: GCASM: Symbol CFGS has not been defined
    Error: GCASM: Symbol FREE has not been defined
    Error: GCASM: Symbol LWLO has not been defined

     
    • Anobium

      Anobium - 2016-01-22

      Would you post all the code please.   Which chip is specified?

       
  • David Stephenson

    Here is the full code I tried.

    #chip 16F690,4
    #config OSC=INTRC_OSC_NOCLKOUT, MCLRE=OFF, WDT=OFF
    
    #include<heflash.h>
    Dim Hello as String
    Hello="Hello GCB World!"
    HEFwriteBlock(5,Hello,len(Hello))
    

    Yes I was surprised the 16F690 had this feature, but it's there in the datasheet.

     
  • Anobium

    Anobium - 2016-01-26

    @David. Does the 690 have HFEM? Are you certain? Can you check please?

     
  • David Stephenson

    Yes it does.

     
  • Anobium

    Anobium - 2016-01-27

    I am being dim. Which paragraph?

     
  • David Stephenson

    No it's probably me that is being dim. I was assuming that as the flash memory and EEPROM write had been grouped together in the same chapter of the datasheet both were readable and writeable- it would seem not. And looking at other devices there is little mention of HEFM even though many new devices have not got EEPROM.

     
  • Anobium

    Anobium - 2016-01-27

    Phew. :-)

    I will send you a revised .h, to test, to expose whether the specific chip HEFM. It is a trap other may encounter in the future.

     

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.