eddy12345
Newbie level 3
- Joined
- Jan 22, 2008
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- united kingdom
- Activity points
- 1,321
Hi there,
Am i right to assume that every variable created in the register in pic16F84(or in other pics) can only have a value from 0-255?
And the only way to have a value larger than 255(for a variable) is by increasing the value of another variable everytime the first variable overflow. I know my explanation is a bit confusing :|...
Example, "counta" for values from 0-255 and "countb" is for overflow of "counta".
so if i have counta= 20 and countb=2,
The total value will be = (255*2) + 20 = 530
If its true, how do you perform calculations higher than 255?
Example, ( 530 - 4) / 6
And what if the calculation yields a value higher than 255? How do you store it?
Any help would be greatly appreciated
Am i right to assume that every variable created in the register in pic16F84(or in other pics) can only have a value from 0-255?
And the only way to have a value larger than 255(for a variable) is by increasing the value of another variable everytime the first variable overflow. I know my explanation is a bit confusing :|...
Example, "counta" for values from 0-255 and "countb" is for overflow of "counta".
so if i have counta= 20 and countb=2,
The total value will be = (255*2) + 20 = 530
If its true, how do you perform calculations higher than 255?
Example, ( 530 - 4) / 6
And what if the calculation yields a value higher than 255? How do you store it?
Any help would be greatly appreciated