I said at the beginning that I wanted to make a project using a graphical LCD. Here are a lot of hardships and nuances that need to be taken into account to dynamically operate pixels. I had little time, I work with project irregularly. I started the project long ago. Not just the program, but need work with the electronic side too. I think others will be able to learn from this project code. Here is the case of the inetresant. Pic16F18877 is full! If you'd like to use more feature, you should make code optimization :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anobium, the charger is in the box and it works. The project is over :) If there is no problem during the operation, I will not do anything. Until next project :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone in the new year!
I want to extend this project with some minor changes, but it doesn't work. When compiling a program, the compiler gives a message! Ahhhhh
Anobium
Full - you sure?
Program Memory: 8118/32768 words (24.77%) RAM: 442/2048 bytes (21.58%) Chip: 16F18877
====================================
i did a little optimization of the program and everything was fine. microcontroller is not full. but now i need to upgrade the program.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need to look at the HTML related to the project - look for the method that is large than the 16f page size. Take that method and cut into two methods - this way the method (its a sub or a function) can then fit within the 16f page.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
He means the part after that, below where it says subroutines there should be a table of routine sizes. Unless it didn't make that part because it wouldn't compile. Then just look for your largest subroutine and break it into two pieces and cross your fingers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
looking at the code you posted on the previous page, it is your main, it was almost too big back then. Just break it in half, make the second half a sub, and call it from the first half.
Last edit: Jim giordano 2020-01-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you Jim & Anobium ! I divided two stages into subroutines. now is possible compile my code! Maybe someone is interested in learning about changes to my battery charger. I had designed it so that when charged at a constant current, the voltage is gradually increased until it reaches a maximum of 15.6V. This voltage remains after that. This is not good because the battery then heats up and releases gas. Therefore, when the maximum voltage is reached, the charger switches to standby mode at 13.0V and maintains a constant storage voltage for the battery.
edit forget this, I was reading page 1
I have seen 2 line lcd displays that are very slow to update. The glcds I have used with gcb are fast for graphics and text.
I would sort the code, eg earlier post
Shematics is attached
Pictures , please
Well done.
A few questions now this is done.
What is the best insight or learning from the project? (Do not saying the help from the forum!)
What advice would you give to others?
I said at the beginning that I wanted to make a project using a graphical LCD. Here are a lot of hardships and nuances that need to be taken into account to dynamically operate pixels. I had little time, I work with project irregularly. I started the project long ago. Not just the program, but need work with the electronic side too. I think others will be able to learn from this project code. Here is the case of the inetresant. Pic16F18877 is full! If you'd like to use more feature, you should make code optimization :)
Full - you sure?
Program Memory: 8118/32768 words (24.77%) RAM: 442/2048 bytes (21.58%) Chip: 16F18877
there is charging, arrows run :)
I hope my programmcode and idea will give benefit and help someone.
Janis, nicely executed and well documented project. Something for all of us to strive for. Thanks for sharing.
when you add another graphical instruction to the code, the compiler no longer compiles. compilation error
Post an example and we can advise... but, I would think you have simply filled a page of memory and you need to split into two smaller subs.
Suspiciously close to memory page boundary (8192).
Thank you Kent! Everyone should help each other and share ideas :). GCB is our little world
Anobium, the charger is in the box and it works. The project is over :) If there is no problem during the operation, I will not do anything. Until next project :)
Hello everyone in the new year!
I want to extend this project with some minor changes, but it doesn't work. When compiling a program, the compiler gives a message! Ahhhhh
this problem was before.
====================================
i did a little optimization of the program and everything was fine. microcontroller is not full. but now i need to upgrade the program.
You need to look at the HTML related to the project - look for the method that is large than the 16f page size. Take that method and cut into two methods - this way the method (its a sub or a function) can then fit within the 16f page.
I didn't understand, here's the HTML page.!
He means the part after that, below where it says subroutines there should be a table of routine sizes. Unless it didn't make that part because it wouldn't compile. Then just look for your largest subroutine and break it into two pieces and cross your fingers.
looking at the code you posted on the previous page, it is your main, it was almost too big back then. Just break it in half, make the second half a sub, and call it from the first half.
Last edit: Jim giordano 2020-01-01
Thank you Jim & Anobium ! I divided two stages into subroutines. now is possible compile my code! Maybe someone is interested in learning about changes to my battery charger. I had designed it so that when charged at a constant current, the voltage is gradually increased until it reaches a maximum of 15.6V. This voltage remains after that. This is not good because the battery then heats up and releases gas. Therefore, when the maximum voltage is reached, the charger switches to standby mode at 13.0V and maintains a constant storage voltage for the battery.
Here's the code attached
edit forget this, I was reading page 1
I have seen 2 line lcd displays that are very slow to update. The glcds I have used with gcb are fast for graphics and text.
I would sort the code, eg earlier post
could be
little things like this happenning often adds up wasted time.
Last edit: stan cartwright 2020-01-02
I looked up charging 12V lead acid battery-- https://batteryuniversity.com/learn/article/charging_the_lead_acid_battery.
Lots involved.
You can use a 3 pin linear voltage regulator as a contant current https://www.youtube.com/watch?v=QY0WfFA3ju4
Here's a little trick you might find useful sometime-
at about line 190 you have
which takes about 180 instructions looking at the .asm file
This could be rewritten as
which takes about 62 instructions, saveing a bit of memory if you are tight on space.
if pwm_perc=>10&pwm_perc<100 then GLCDPrint(90, 25, pwm_ref_string + "% ")
if pwm_perc=>10 then if pwm_perc<100 then GLCDPrint(90, 25, pwm_ref_string + "% ")
might be faster
Syntax Error: Mutliple IFs not permitted. .
but, indeed
is faster, first takes 160 ticks, second takes 132 ticks.
and it's 10 instructions smaller!
But we should stop cluttering up JANIS's thread :)
Last edit: Jim giordano 2020-01-02