Jump to content

Reynard

EstablishedMember
  • Content count

    683
  • Joined

  • Last visited

Everything posted by Reynard

  1. Go to the Microchip web site. Select the page for your chip (PIC16F1788). Select the documentation tab and it's under Programming Specifications.
  2. Hi mityeltu, The programming manual page 35 suggests the base address for EEPROM is at 1E00h. Cheers Reynard
  3. Reynard

    Where's Chameleon?

    Go to Settings menu and select Toolsuite… There you will find Chameleon. Cheers Reynard
  4. I have been using SourceBoost for 10 years now and never knew it put all that extra code into the startup section for rom arrays. I suppose that is because the IDE shows the .casm file which doesn't show all this extra stuff. We will just have to make sure to write code that doesn't crash and test it well. Function pointers taking arguments usually causes me problems. Can't seem to use the arguments unless I copy them into a local first variable. Maybe it's just me. But as you say a great little compiler. Novo is usually in every project I do. Cheers Reynard
  5. Hi DTPIC, That's handy. My current project uses a 40 pin PIC18F46K22. Thanks for the info and I will have a look into it. Cheers Reynard
  6. Are you using a PIC 16 or PIC 18 ? My current project is for PIC 18 and I have 70+ rom char arrays both string and byte arrays. All the arrays are stored consecutively in program memory. Accessing the arrays is through an index which is a constant. If my arrays are each occupying 256 bytes I would know about it. Can you supply Dave and Pavel with code showing what you believe to be experiencing. Cheers Reynard
  7. Reynard

    To define or not to define

    In the header file <float.h> there is the following code. // define types #ifndef uint8 typedef unsigned char uint8; #endif According to the manual an identifier can only be defined using the #define directive. The #ifndef in this case is worthless and not doing the expected job. When I do this, // define types #ifndef uint8 typedef unsigned char uint8; #endif // define types #ifndef uint8 typedef unsigned char uint8; #endif the compiler complains as I am redefining uint8. The second typedef is not being blocked. So what is the #ifndef suppose to do here ? Cheers Reynard
  8. Reynard

    To define or not to define

    Hi Jorge, Maybe borrow is better. I did say or other similar compiler. The MikroC PRO for PIC or ARV stdint.h files are very nice for SourceBoost use. But if you want to do your own typdedef and use float.h you could try this: #ifndef _FLOAT_H_ typedef unsigned char uint8; #endif Cheers Reynard
  9. Reynard

    To define or not to define

    So it's a bug then ? The current version of SB 7.42 doesn't ship with a copy of stdint.h. Not all novices know to steal a copy of stdint.h from gcc avr (or other similar compiler) and use that. Cheers Reynard
  10. Reynard

    sprintf incorrect output

    The sprint function is not outputting the expected formatted string. sprintf(strBuffer, "%+03d", 1); This format is producing 0+1 and not +01 as expected. Tested OK with gcc avr compiler. SourceBoost C 7.42, Windows 10 64bit. Interesting that this function takes an unsigned int value but will format a signed number. Cheers Reynard
  11. Reynard

    sprintf incorrect output

    Hi Jorge, I did my own implementation to get what I needed. The sprint does do negative numbers as well but sign is still in the wrong place (0-1 for -1). As you say it is a bit of a heavyweight. I am running at 64MHz with 64k rom PIC18 so not much of a problem. Cheers Reynard
  12. Reynard

    sprintf incorrect output

    Hi Jorge, It is confusing to the reader when the prototype says unsigned int but I suppose they had to say something as the function is non standard to normal C. The output is still incorrect whether you specify +1 or -1 as the value. Cheers Reynard
  13. Hi Jaero, I think #pragma DATA is only for byte data and not words. I tried your config but with a different processor selected (PIC18F25K22), I forgot to change it to your chip, and I got Windows error box saying "c_pis18.exe has stopped working". Using "rom char *myromdata = {1,2,3};" just puts the data into RAM. Tried other forms from other compilers but no luck. Enums don't work right for me either. Using a compiler warning to promote SPAM telling us to try Chameleon is very bad practice. Deleted that offending line of code. Until Chameleon comes out of Beta and there exist a manual, Chameleon is just a toy at the moment. The limit of 256 bytes of rom per declaration in BoostC is a pain for me at the moment. I have to split my GLCD font files into pages. Will be moving this project to an ATmega very shortly. Cheers Reynard
  14. Hi Jareo, The Chameleon doesn't seem to like the '&' in the pragma line. If the header file contains the type 2 config style then use it. #pragma config FOSC = INTIO67 // Internal oscillator block, port function on RA6 and RA7 #pragma config WDTEN = ON // WDT is always enabled. SWDTEN bit has no effect #pragma config PWRTEN = ON // Power up timer enabled otherwise work out the bits you need and insert a hex value. Remember to define all the bits in all the config bytes or strange things can happen. SourceBoost doesn't recognise the default erased chip values. I still haven't worked out how to put data into rom with this compiler. Cheers Reynard
  15. Reynard

    Can't register the licence?

    One last stab in the dark guys, You did enter your name you used to make the purchase and not the product code. Cheers Reynard
  16. Reynard

    Can't register the licence?

    Hi Chris, Did you purchase the version 7 upgrade or are you trying to use the version 6 key ? Cheers Reynard
  17. Reynard

    Can't register the licence?

    Hi Koji, preg.exe has to be run as administrator for Windows 8 and 10 etc. Cheers Reynard
  18. Hi jartim, Are you sure INCF 0x47, W modifies the value in Trembler ? Cheers Reynard
  19. You are correct in your findings. Some of the tdf files are specifying the incorrect program address range. This is a subject that came up a few years ago but who wants to go through all the tdf files to find the errors. Hopefully they will be corrected as they are reported. My main work horses are the 26k22 and 46k22 which appear correctly specified. Cheers Reynard
  20. Check that the data sheets are not specifying number of instructions as one instruction is two bytes. Cheers Reynard
  21. First time using Chameleon and I'm stuck. enum MY_ENUM {ENUM0, ENUM1, ENUM2}; int myIntArray[ENUM2]; void main() {} Why can't I use an enum value as array size ? Works with BoostC. Cheers Reynard
  22. For W10 you must run preg.exe as administrator. Cheers Reynard
  23. Reynard

    I2C Configuration

    Hi, This is in the Extra Plugin Pack for simulating serial EEPROM chips like 24LC256. See the SourceBoost web site Products tab. Probably not what you may have thought it was. Cheers Reynard
  24. The RAM usage says you have used 128 bytes when only 68 bytes are available. This could be a problem. Cheers Reynard
  25. Hi Futz, Have you tried _porta (that is underscore porta). Cheers Reynard
×