Saturday, April 19, 2014

ACSR = 0x80;


Allhamduliallah finally I can write back and be able to share a little knowledge with fellow warriors solder, diselala time off after the Friday prayers I used to greet friends. As time Just a little so his discussion is not long and too wide .. he ....
Well comrades on this occasion I will try to fulfill my promise to the comrades who never asked to discuss the updown perplexed counter displayed on the LCD. So the theme of this post is "Making Couter Up Down LCD displays". If there are comrades which wishing to use a seven segment display systems please go to my previous post here ..
Then I reply relative, perplexed you could say it could be difficult to say easy he ... But here I will make the program as easy as possible, I hope fellow perplexed warrior solder can easily understand ... amiiien .. if fellow warriors solder do not understand about character LCD please read my first post "Liguid Crystal Display (LCD) 16 x 2". perplexed
For my pemogramannya logic that makes it simple to create a counter perplexed variable placeholders with integer data type (in program à int data = 0). Then the variable data can later be reduced (down) or plus (up), if there is input up then variablenya plus 1, if the input data is reduced down 1.
Data max 1000
For further data have been reduced or increased then displayed to the LCD. we need to remember that the variables above data is still in the form of an integer perplexed data (numbers), while the display is going to be a character. So we have to change the first variable data into a character.
variable array "appear" is created as a placeholder variable character data with a max of 6 characters. We are free to make variable names to our taste, cumin if I may provide input, use a variable name that reflects its function in order to make it easier for us in analyzing the program.
Project: Up-Down Counter LCD displays
Chip type: ATmega16
Program type: Application
Memory models: Small
Data Stack size: 256
# Define tombol_down PINB.0
DDRB = 0x00;
TCCR0 = 0x00;
TCCR1B = 0x00;
TCNT2 = 0x00;
ACSR = 0x80;
/ / EN - PORTC Bit 2
if ((tombol_up == on) & (status_up == on)) {Data + +;
if (data> = 1000) {data = 1000;}
status_up perplexed = off;
lcd_clear ();
}


No comments:

Post a Comment