EEPROM and Binary Counter
Moderators: Chuckt, Garth, bitfogav
EEPROM and Binary Counter
Hey all,
I made this project a few months ago and thought It would be a good idea to share it with everyone, the project involves using the on board eeprom on the microchip and is also a 8bit binary counter using 8 LEDs..
I made it so a I could learn more about programming eeprom, and learn more about addressing eeprom memory and learn about reading and writing to and from the eeprom with microchips, it will probably make a good tutorial in Brads University? hehe!
Heres a picture of the project on breadboard
How is works, well you have one button connected as a input, the microchip then counts how many times you press the button, at the same time a selected led is turned on, but the leds are arranged in a 8bit binary form, what I mean by this is that, if you pressed the button 10times this indicates 10, So the led to the far right would be on and the 4th from the right, this would indicate a binary count of 8 and 2 which = 10
If someone knows how 8bit binary works then they would understand this abit more but this could be a good project to help someone understand 8bit binary..
So has for the EEPROM side of it, when you release the counting button the microchip will save the number of counts into the eeprom and then if the power was turned off from the microchip, the next time the power was applied to the microchip the value would be read from the eeprom and displayed again on the leds..
I have also added another switch to the microchip which resets the counts and the stored eeprom counter value..
Heres the souce code
http://www.bradsprojects.com/phpBB2/upl ... v1_174.asm
I will make some schematics aswell and post them soon
I made this project a few months ago and thought It would be a good idea to share it with everyone, the project involves using the on board eeprom on the microchip and is also a 8bit binary counter using 8 LEDs..
I made it so a I could learn more about programming eeprom, and learn more about addressing eeprom memory and learn about reading and writing to and from the eeprom with microchips, it will probably make a good tutorial in Brads University? hehe!
Heres a picture of the project on breadboard
How is works, well you have one button connected as a input, the microchip then counts how many times you press the button, at the same time a selected led is turned on, but the leds are arranged in a 8bit binary form, what I mean by this is that, if you pressed the button 10times this indicates 10, So the led to the far right would be on and the 4th from the right, this would indicate a binary count of 8 and 2 which = 10
If someone knows how 8bit binary works then they would understand this abit more but this could be a good project to help someone understand 8bit binary..
So has for the EEPROM side of it, when you release the counting button the microchip will save the number of counts into the eeprom and then if the power was turned off from the microchip, the next time the power was applied to the microchip the value would be read from the eeprom and displayed again on the leds..
I have also added another switch to the microchip which resets the counts and the stored eeprom counter value..
Heres the souce code
http://www.bradsprojects.com/phpBB2/upl ... v1_174.asm
I will make some schematics aswell and post them soon
- Attachments
-
- binary_counter.jpg (45.59 KiB) Viewed 13309 times
-
- Binary counter.jpg (45.1 KiB) Viewed 13341 times
-
- Binary Counting TutorialV1.asm
- (8.82 KiB) Downloaded 498 times
Heres the schematics
http://www.bradsprojects.com/phpBB2/upl ... er_170.zip
Note this schematics is for EAGLE
http://www.bradsprojects.com/phpBB2/upl ... er_170.zip
Note this schematics is for EAGLE
- Attachments
-
- Eeprom & Binary Counter.zip
- (13.71 KiB) Downloaded 554 times
- sdudley
- Moderator
- Posts: 337
- Joined: Sun Mar 28, 2010 1:33 pm
- Location: Florida, U.S.A. [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
What a great project!
I love projects that are quick, to the point, and do something useful. Definitely should become a tutorial!
I did not read through the code but had a quick look and love how nice and clean it is (makes for easy reading). I like to section off my routines just like you did.
I have always wanted to look into programming with eeprom storage. This is my chance!
Thank you.
I love projects that are quick, to the point, and do something useful. Definitely should become a tutorial!
I did not read through the code but had a quick look and love how nice and clean it is (makes for easy reading). I like to section off my routines just like you did.
I have always wanted to look into programming with eeprom storage. This is my chance!
Thank you.
Thanks Stacy
The souce code that I have uploaded is a basic start to eeprom and the way it works, you can change the souce code to select different eeprom addresses to store your data, and read your eeprom from your programmer, if you got a pickit2 this is quite easy.
I guess I should make a tutorial for it because before I started looking into eeprom on the microchip I didnt know where to start, took me awhile reading through the datasheet to understand it
The souce code that I have uploaded is a basic start to eeprom and the way it works, you can change the souce code to select different eeprom addresses to store your data, and read your eeprom from your programmer, if you got a pickit2 this is quite easy.
I guess I should make a tutorial for it because before I started looking into eeprom on the microchip I didnt know where to start, took me awhile reading through the datasheet to understand it
- sdudley
- Moderator
- Posts: 337
- Joined: Sun Mar 28, 2010 1:33 pm
- Location: Florida, U.S.A. [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
I know exactly how you feel. I wanted to know about interrupts and could not find any plain and simple answers. Like you, I spent a LOT of time reading through the datasheet, asking questions on the Microchip forum and searching around.bitfogav wrote:...before I started looking into eeprom on the microchip I didnt know where to start, took me awhile reading through the datasheet to understand it
I just wanted a very basic tutorial on how an interrupt works and something so I could see it working. That is why I finally uploaded one to Brad's Projects University. I tried really hard to keep it as simple as possible.
I am excited to go through your code and see how to utilize eeprom in my projects!
For people who dont know much about eeprom then I recommend looking at this website
http://www.arlabs.com/help.htm
http://www.arlabs.com/help.htm
Who is online
Users browsing this forum: No registered users and 1 guest