PDA

View Full Version : Very simple question (for someone)



lew247
- 15th December 2009, 12:14
IF I have a program I've written in picbasic pro, it comiled ok and end up with a hex code.

How do I know how much code space in the pic it will take?

I want to see if I can use a physically smaller pic, rather than a 40 pin one, but if I right click on the hex file and do properties it says 8k

BUT

I'm not sure that's how you measure the code space.

Could someone elighten me please?

sayzer
- 15th December 2009, 12:23
IF I have a program I've written in picbasic pro, it comiled ok and end up with a hex code.

How do I know how much code space in the pic it will take?

I want to see if I can use a physically smaller pic, rather than a 40 pin one, but if I right click on the hex file and do properties it says 8k

BUT

I'm not sure that's how you measure the code space.

Could someone elighten me please?


http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3826&stc=1&d=1260879754

jellis00
- 27th December 2009, 02:36
[QUOTE=lew247;82042]I'm not sure that's how you measure the code space.
QUOTE]

Most editor/programming environemtns provide this at the time you compile. For example, I use MicroCodeStudio with the PicBasicPro compiler and the MASM assembler and when you compile it tells you how much code memory is required at the bottom left of the MicroCodeStudio window.

I have also used the mikroElectronik PICFlash programmer to take a .hex file that was created by the MicroCodeStudio/PicBasicPro/MASM and it shows at the bottom left of the window the amount of code and data memory available in the target device.

HTH.