Newbie frustration.
Moderator: Benj
-
- Flowcode v5 User
- Posts: 19
- Joined: Wed Aug 14, 2013 3:53 pm
- Location: Thailand
- Has thanked: 1 time
- Been thanked: 3 times
Newbie frustration.
Hello Forum,
Can you please help a new starter find a simple problem with his first attempts.
I want to read a PIC SFR (tmr1l) and display on LCD. My LCD shows some values that exceed 255.
Any idea why this may be happening? Should be 8 bits only.
Thanks in advance. Richard.
Can you please help a new starter find a simple problem with his first attempts.
I want to read a PIC SFR (tmr1l) and display on LCD. My LCD shows some values that exceed 255.
Any idea why this may be happening? Should be 8 bits only.
Thanks in advance. Richard.
Re: Newbie frustration.
HI
First off welcome, can you follow the link in my sig and sign up to the relevant forum as you will get more help ,can you also post your flowchart as you will get more help if someone can see what your trying to do in flowcode
Regards
Dazz
First off welcome, can you follow the link in my sig and sign up to the relevant forum as you will get more help ,can you also post your flowchart as you will get more help if someone can see what your trying to do in flowcode
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Flowcode v5 User
- Posts: 19
- Joined: Wed Aug 14, 2013 3:53 pm
- Location: Thailand
- Has thanked: 1 time
- Been thanked: 3 times
Re: Newbie frustration.
Hello Dazz,
I am registered forum member but posted here as it seemed to be best suited for my question.
What they need is a newbies section so we do not clutter the pro forum with trivia!
Have attached my attempt. It was originally posted on internet by Roman Black.
I have tried to copy it using flow code (original was in MikroC) but not been sucessfull.
Thanks for your time.
Richard.
I am registered forum member but posted here as it seemed to be best suited for my question.
What they need is a newbies section so we do not clutter the pro forum with trivia!
Have attached my attempt. It was originally posted on internet by Roman Black.
I have tried to copy it using flow code (original was in MikroC) but not been sucessfull.
Thanks for your time.
Richard.
- Attachments
-
- My Tester3.fcf
- (8.5 KiB) Downloaded 290 times
Re: Newbie frustration.
HI
i missed your were registered sorry
nothings trivial and every question is valid
can you link to the original code and a description of what it does so i can have a closer look
Regards
Dazz
i missed your were registered sorry
nothings trivial and every question is valid
can you link to the original code and a description of what it does so i can have a closer look
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Flowcode v5 User
- Posts: 19
- Joined: Wed Aug 14, 2013 3:53 pm
- Location: Thailand
- Has thanked: 1 time
- Been thanked: 3 times
Re: Newbie frustration.
Hello Dazz,
I will send original code.
I am just using it as a learning experience as it will be useful to me later.
In brief, i have declared a variable (RJH), then RJH=TMR1L then used lcd block to send it.
I get values but bigger than i expect.
The original code is more complex but you can see where i got my attempt from.
Appreciate your time.
Richard.
I will send original code.
I am just using it as a learning experience as it will be useful to me later.
In brief, i have declared a variable (RJH), then RJH=TMR1L then used lcd block to send it.
I get values but bigger than i expect.
The original code is more complex but you can see where i got my attempt from.
Appreciate your time.
Richard.
- Attachments
-
- XTAL_Calib.c
- (3.58 KiB) Downloaded 320 times
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: Newbie frustration.
That's strange ... Your RJH is an 8 bit variable and the TMR1L is 8 bit too.
Have you tried setting RJH to, let's say, 127 and see if it still shows values bigger than 255 ?
I don't see anything wrong in the code though...
- Nicolas
Have you tried setting RJH to, let's say, 127 and see if it still shows values bigger than 255 ?
I don't see anything wrong in the code though...
- Nicolas
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Newbie frustration.
Hi Richard,
I know whats going on.
Your not clearing a space display after the last digit.
For example 1st value is 152
Then if the second sample is 68
since not printing " " after 152
then the display will show 682 even though it is a byte that has been printed (since the 2 will remain from the previous number).
Its just an LCD formatting issue.
I have attached a modified Flowchart.
If you need any further help then let us know.
Martin
P.s. since you now a registered V5 user, I will move this topic to a more suitable section of the forum
I know whats going on.
Your not clearing a space display after the last digit.
For example 1st value is 152
Then if the second sample is 68
since not printing " " after 152
then the display will show 682 even though it is a byte that has been printed (since the 2 will remain from the previous number).
Its just an LCD formatting issue.
I have attached a modified Flowchart.
If you need any further help then let us know.
Martin
P.s. since you now a registered V5 user, I will move this topic to a more suitable section of the forum

- Attachments
-
- My Tester4.fcf
- (9 KiB) Downloaded 302 times
Martin
Re: Newbie frustration.
HI
have a quick check of attached flowchart, you will have to work out the ccp and tmr 1, but most of c file converted to flowcode, you should be able to work out what goes where if you check the c and flowchart side by side ( timers and ccp im not very good at)
Regards
Dazz
have a quick check of attached flowchart, you will have to work out the ccp and tmr 1, but most of c file converted to flowcode, you should be able to work out what goes where if you check the c and flowchart side by side ( timers and ccp im not very good at)
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: Newbie frustration.
How did I not see that... *facepalm*medelec35 wrote:...
For example 1st value is 152
Then if the second sample is 68
since not printing " " after 152
then the display will show 682 even though it is a byte that has been printed (since the 2 will remain from the previous number).
Its just an LCD formatting issue.
...
- Nicolas