Skip to main content
Topic: Pic12f1840 tvbgone code (Read 14415 times) previous topic - next topic

Pic12f1840 tvbgone code

Hi,
like the title says i have successfully ported the european tvbgone to the PIC12F1840.
For now with only the 6 most diffused code, all the project uses about 17% of the memory program and 13% of the data memory.
I am using the free version of hitec c so the optimization is not very good.
Later this day i will upload a new project with all the code that i can fit on the pic.
For test the code i make a simple board.
Userled is RA4 and the pwm/ir led is RA5.
Finally there is a tvbgone for an 8 pin uc that isn't an avr ;)

Re: Pic12f1840 tvbgone code

Reply #1
Oh, and the pic on my supplier is cheaper than the Attiny85V so :)

Re: Pic12f1840 tvbgone code

Reply #2
The hitec complier with big sources codes is acting in a very strange way...it compiles the project with 55 codes and uses something like 65 % of the memory but when i try to compile with 60 codes it doesn't finish the compile and mplab crash.
I'm now tryng to use microchip new compiler XC8 but i don't know if it works under an mplab 8.xx version...

Re: Pic12f1840 tvbgone code

Reply #3
I love this pic! They're really cheap, you can get them in nearly all packages. I guess this could also fit in the 12F1822 (which has half of the memory or so).

About that compiler, it's really designed to be used for MP lab X. Give it a go, I like it better than MPLab 8 :)

I had an old laser pointer lying around, I might be able to fit all of this in there too! But time... time...

Re: Pic12f1840 tvbgone code

Reply #4
This is the project with 70 codes that should compile without problem beacause it does with 60 codes and the memory used is about 74 % so it shoul fit 70 codes, but when i try to compile it it never ends.
Can someone try it?
And yes thid version should fit the 1822 without problem.

Re: Pic12f1840 tvbgone code

Reply #5
I tried it with the XC8 compiler and it seems to keep on running there too.

I get this warning: (1273) Omniscient Code Generation not available in Free mode (warning)
Not really sure what causes it!

Re: Pic12f1840 tvbgone code

Reply #6
o.O or is the code or the free version of the compilers, in my pc after i close mplab i have to terminate the cgpic.exe in task manager that uses 50 % of CPU!!

Re: Pic12f1840 tvbgone code

Reply #7
Oh, I checked again! It seems it compiled just fine now :-) I just imported the project into MPlab X. It did take quite some time.
According to the stats, it consumes 82% of the flash and 9% of the RAM. Let me see what it does when I select the 12F1822 :)

Re: Pic12f1840 tvbgone code

Reply #8
i don't think that it will compile for it, because the 1822 has half the memory so if it was 50 % maybe but it is 82 % so i don't think...
Can you try with more codes, until the memory is completely used, and then share the hex?

Re: Pic12f1840 tvbgone code

Reply #9
I'm letting it run for the 1822 now. You never know that compiler does some crazy stuff :-)

After lunch I'll get it compiling with more codes. We could try to use the trial version of the XC8 compiler. It should enable optimization and reduce things somewhat more. But nevertheless, the codes should still be stored. and you can't optimize that away!

Re: Pic12f1840 tvbgone code

Reply #10
I tried with the XC8 and after a ---> LOT OF TIME <--- it compile also on my pc :)
I tought about using the trial of the pro version of the compiler but then the code is not very "open" and customizable, but the compiler says that the pro version generate 40 % smaller code than the free so i think i will try and see what happens.

Re: Pic12f1840 tvbgone code

Reply #11
It just 'finished' compiling for the 12F1822.

../WORLDcodes.h:3975: error: could not find space (138 bytes) for variable _EUpowerCodes
../WORLDcodes.h:3975: warning: object "_EUpowerCodes" lies outside available data space

Memory is full :-) I'll see how many extra we could add...

Re: Pic12f1840 tvbgone code

Reply #12
Thank you very much for the help, at this point i think that is or my pc or the 8.xx version of the mplab.It takes too much time...

Re: Pic12f1840 tvbgone code

Reply #13
Same here, I canceled compilation because I needed the processing power :-) I don't quite understand why it's taking so long. Putting all the stuff in the right memory locations shouldn't be too hard...

Re: Pic12f1840 tvbgone code

Reply #14
I really don't understand. it is very strange.
Wow if you search "xc8 never ends compile" on google, one of the first result is this post.