Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

More read-only memory for a small-ish PIC?

Status
Not open for further replies.
You can always use the onboard EEPROM memory... There are 256 bytes available... You can change it dynamically...

So 2k program space 128bytes data space and 256 bytes EEPROM space...

If your array is 72bytes... You can afford 3 of them in EEPROM memory...
 
I'd thought of this and enquired on the JAL mailing list... it didn't seem simple or convenient or efficient. The advice was to be patient and wait for my 1825s to turn up. Ha! I know how to read and write bytes to the EEPROM, but it'd be quite manual, right? I could not just declare the byte array as being held in EEPROM. Maybe I'll actually be best for once in just "throwing hardware" at the problem.
 
I like Jal but it's not prefect I'd look at the dis assembly code and see what its doing
 
Sorry to say this - use assembler, and then do what YOU want to with the memory space :D

The enhanced 16F range allows you to access RAM as a single linear space, which makes it VERY user friendly.
 
The enhanced 16F range allows you to access RAM as a single linear space, which makes it VERY user friendly.

OK, but the 16F1823 is on the list of "enhanced" 16Fs on Microchip's site when I get to "Enhanced Mid-Range Products"... admittedly, so is the 1825. That doesn't mean that I can just "see" 128 bytes + 256 bytes as a contiguous block available to me on the 1823, does it? Are you implying I should be, somehow, able to see and use a block of 384 bytes somehow on the 1823, without caring how Data Memory has been allocated between SRAM and EEPROM?
 
OK, but the 16F1823 is on the list of "enhanced" 16Fs on Microchip's site when I get to "Enhanced Mid-Range Products"... admittedly, so is the 1825. That doesn't mean that I can just "see" 128 bytes + 256 bytes as a contiguous block available to me on the 1823, does it? Are you implying I should be, somehow, able to see and use a block of 384 bytes somehow on the 1823, without caring how Data Memory has been allocated between SRAM and EEPROM?

Yes, read the datasheet - and use assembler :D
 
I don't think this advice is very applicable to my situation. You are aware that I'm using a high level language which clearly seems to be telling me that the data space available to me, on this 1823, is 128 bytes - as per the datasheet. I've read the stuff on linear data memory (sections 3.5.2 and 3.5.3?) and it gives me zero help in understanding how I might address more data memory with the environment that I'm using. Blithely suggesting that I use assembler isn't particularly helpful, you've gotta admit, as I already have lots of code done in JAL (sorry if that wasn't clear, but I've posted enough about JAL on this forum over the last 5 years). Now, I know that I can certainly put bits of asm into my JAL inside a block - would that help? I am still failing to see how I would just get access to that extra 256 bytes of data space, though... I can't just declare another 72 byte variable array and it would magically find itself in there, can I?

I think... what I have concluded... is that I should wait for the 1825s to arrive... they'll provide 1,024 bytes of SRAM data space... but still only an 'extra' 256 bytes of EEPROM data space... I'll stuff a pseudo-random seed in there, for sure, but have my proper variable data in the SRAM space. ;)
 
OK, let me look at them... I'm not really familiar with the entire range.

I've stuck with 14-pin PICs (well, some 8-pin ones as well) mostly, because they're lovely and compact and I've never really run into any issues with the kind of stuff I want to do before - this issue has really only arisen now because I blew up the single 16F1825 I was using and now I've got to wait for some more to turn up, hence I fell back to the 1823 and it raised this question for me (admittedly, I did get confused over what PIC I actually had been working with the last few days). Mea culpa.
 
I made two boards..... One supports the bog standard 40pin Pic16f877a and pic16f887 ( the ones I use) it also takes the pic18f4520 and pic18f4620.... Then there is the smaller 28pin for the 28 pin counterparts...

The new pic32mini from MikroE fits directly into my board...... 14 and 8 pin micro's have their place but you soon run out of pins...

I just recently used the pic16f1828/9... But they are smt's and for something else...

What I'm trying to say is.... Most of the big memory devices start at 28 pin....
 
Gotcha.

You may realise that most of my stuff is with LEDs... RGB LEDs. Wall washers, top hats, artwork etc. etc.. When I was doing art with 3 strips of RGB LEDs I needed 9 output pins... I got a PCB designed and everything... never really had a problem until I started doing PWM across all 3 strips at once - then I found out I needed a 32MHz PIC, so chose the 1823 and 1825 to play with and they both worked. Then I recently started thinking I'd not mind having a few inputs to the outside world, maybe a potentiometer or four, certainly a light sensor and even a radio clock input... maybe I'd run out of pins then... but the WS2812B LEDs came along... now I just need 1 pin to control a whole set of LEDs, 1 pin per separated out strip / ring (if I decided to do it that way)... but I need to alter my way of programming them... and I certainly need a 32MHz PIC and, it looks like, more data space.

So the 16F1825 still looks like it's my best bet. I reckon.
 
Pic18f1220 has 18 pins.....

Ive used the 18F1320 with no issues, it does lack SPI/I2C, but Thats where the K series and some 28 pinners come in. My 18F2410 is my main "work horse" that is used to do most things, Ive been using a 18F13k22, which is a 20 pin and has a ton of nice features. 64Mhz is also a nice plus, which almost puts it on par with some 32 Bit Procs.

I do keep a 40 Pin PIC on hand, Just in case I ever need 40 pins.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top