This project here is a production line counter build on an ATmega 8 micro.
It has 4 digit seven segment display.
It can count from 1 to 9999 pieces.
(01b) Input can be delayed, so that every input recived will block the counter for an amount of time, to prevent double reading on too sensitive item sensors.
User can program it to emit an alarm when a number of items is reached.
Also a plus and minus button are present to adjust items count, if something has to be changed manually.
Holding the select button for a while make the counter reset.
To enter programming mode the select button have to be pressed while the device startup.
Setup parameters are contained in main.h, key.h and sevseg.h
This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 8MHz.
Changelog
- 01b: added the input delay capability
- 01: first release
Code
Notes
- read risk disclaimer
- excuse my bad english
Ebay search for character LCDs. They're as cheap as $3 - perhaps less than your 4x7-segment. Fewer wires too!
ReplyDeletehttp://www.ebay.com/sch/hd44780
http://www.swharden.com/blog/2011-07-24-frequency-counter-gen2/
led display deserve here to make counter more visible.
Deleteof course you could adapt this code to any output you want :)
...nm, I see on your G+ you've done this :)
ReplyDeleteSir, can you send me hex file? I want build this project. Thanks
ReplyDeleteHello,
Deleteyes, just send me your email address.
Thanks sir, this is my email.
Deleteulywae@gmail.com
Excute me,I can't compile this project source.can you send .hex file for me?
ReplyDeletewisitunlimitedjib@gmail.com is my email.Thank you so much.
You've got mail.
DeleteExcute me,I can't compile this project source.can you send .hex file for me?
ReplyDeletesaifudinho@gmail.com tanks
Hello,
Deleteyou've got mail.
when I make you this product . I have trouble on the select button does not work when it is appropriate skema . please give solution
ReplyDeleteI suppose it should be something to do with the ADC raw value read. You can enabled the BUTTON_TEST def, read the output on the sev segment display, and then set BUTTON_ADCUP, BUTTON_ADCDOWN, BUTTON_ADCSELECT according to that.
Delete
DeleteI do not understand . I give you my compiler link . will learn from your source . bicause i loking avrr gcc i not found . my you have link for me
Hello. If you give me your mail i can send you my compiled hex.
DeleteSaifudinho@gmail.com
DeleteThis my email sir
You've got mail.
DeleteSam sir.the buton select does not work.
DeleteDouble check your wiring. It should be a wiring issue, or a ADC threshold value issue. To solve this, you have to debug it. Try to perform steps that i write down in my "March 24, 2016 at 7:55 PM" comment, what's the UART output for that test?
DeleteSam sir.the buton select does not work.
DeleteI'm sorry but debugging from post comments it's difficult. You have to test it using at least an UART debug technique.
DeleteThis comment has been removed by the author.
DeleteGreat project which I was looking for, thanx for sharing
ReplyDeleteDavide, can't compile as well, I saw You sent hex files, may I got too? waldemar.beben@gmail.com
ReplyDeleteMay You modify displays to LCD? It's so easy for You. I'm sure, still black magic for me :)
Also increase max value and implement reset port ?
I just began my experience with ATMega processors, as I'm from times when TV were bulbs b/w and frst computer which I saw was ZX 80 with softwares saved into cassette tapes :)
I have some experience with eproms, I like to learn more with flash technology
Cheers :)
Hello. You've got the hex in mail. It will be fairly easy to use an LCD instead of the seven segment, and to increase the intervall. You have just to add an LCD library. There are a few for ATmega. I like the Peter Fleury one. It's useless if i do it for you, here the matter is to learn.
DeleteThank You Davide, yes, at that moment I'm still fighting with WinAVR, I would like to compile myself. Makefile is fine but still Process Exit Code: 2 :)
DeleteThis comment has been removed by the author.
DeleteI've read from your post below you have finally make it works. I'm happy to hear this :)
DeleteFinally I built and all works great, many thanks Davide, for project, software and hex file :) Atmega8 programed by MkAvrCalculator http://www.atnel.pl/download.php?programy/SoftPack_ATB.zip and STK 200 which I built :) Cheers
ReplyDeleteHello and thank you for sharing!
DeleteSir please send me hex file 01b, my email ulywae@gmail.com thanks
ReplyDeleteHello, you've got mail.
DeleteSir, can you send me hex file? I want build this project?
ReplyDeleteI am interested in the whole project as a teaching me.
Hello, just tell me your email, i will reply you back with the hex.
Deleteok thank you for your kindness, my email is ufyded27@gmail.com
ReplyDeleteHello. You've got mail.
DeleteHi brother. I am Bangladeshi. Can you send .hex file of this project for me? my email:
ReplyDeletekaiyumhasanm@gmail.com
Please give me hex file.My email:
Deletekaiyumhasanm@gmail.com
Hello, here you can find the hex compiled. Link expires in 2 days: https://expirebox.com/download/b09bf146b72f4f3cf91bd5cc000de104.html
DeleteThank you my dear sir.
DeleteThis comment has been removed by the author.
ReplyDeleteI have flashed the hex on Atmega8A-PU. But When the select, Up and Down button press, the display turn off.Is it not suitable for atmega8a-pu?
ReplyDeleteHello, yes, it can run on a ATmega8, i suggest you to compile the project and debug it to understand this behaviour. It may be F_CPU and fuses settings.
DeleteThis comment has been removed by the author.
ReplyDeleteDear sir, Please give me the file for atmega8a. And F_CPU and fuses settings information link.I used Avr programer , Avrpal.net software and fuse bite H-D9, L-F1. And used hex file what you gave me.
ReplyDeleteYou already have got the ATmega8 file. For the fuse, take a look at the ATmega datasheet, or you can also look here: http://www.engbedded.com/fusecalc/. It's better if you understaind how fuses works, if I do this for you it will be pretty unusefull. Tips: Low:F1 is External Clock, I will try the internal oscillator for the frequency this hex is compiled againsta (i.e. 8Mhz).
DeleteSir,Which is small to you, it's too big for me. I have tried a lot. But did not understand. Please Give me the right fuse information. Otherwise it would not be possible for me to do this project.Please help me sir.
DeleteNeed to use crystal?
DeleteThere was a time when which is small to me, was big to ohers, but if I just follow other people checklist instruction I would never learn how to work on that and errors makes you grow. Said that, you can set the LOW fuse to E4 to use the internal 8Mhz ATmega8 crystal, and forget about any external crystal. But keep in mind that an incorrect fuse settings can "brick" your ATmega, then you will need something like the Atmega fusebit doctor to make it works again. Happy experiments.
DeleteSorry Sir. Now All button are working but only select button does not work. I have checked the wearing, all is fine.So What could be the problem? Is it problem of hex file ?
DeleteIt could be related to R15. For this design it si better if you compile it by yourself reading the raw values for button, you can find instruction inside the code.
Deleteplease!
ReplyDeleteHello. Please do not flood with messages.
DeleteDear sir What is indl=0-50 in this option?
ReplyDeleteHello, it's just the input delay, it is a simple debounching method.
DeleteMany many thanks sir. I've completed three of your projects. I like all of your projects. I will try to create some more projects.
DeleteThank you!
DeleteDear sir, When the motor(A.c) is turn on or off in same line, the count number automatic resets or display off. I also used 10k resistance grand to pc6(reset) but same problem. What is the cause?
ReplyDeleteHello, I do not understaind what you mean with the motor turn on and off. I suppose you are using this with a motor attached on the same power supply, if so you should try using a current limiter, or a 100uF and a 100nF cap to filter the line, also a 100ohm resistor in series can help, if the motor is big enough it could also be caused by Electromagnetic Interference (EMI).
Deleteyou are right sir. Thank you sir.
ReplyDeleteYou're welcome. ;)
DeleteSorry Sir, I lost the hex file. Please send me the hex file again, Email: kaiyumhasanm@gmail.com
ReplyDeleteHello. You can download that from here: https://expirebox.com/download/ff4af71500c2c2e48879925b524b2b1d.html Link expires in almost 2 days.
DeleteThis comment has been removed by the author.
ReplyDeleteSir, Can you send me Hex file? I want build this GR8 Project. Thanks
ReplyDeleteqamars65@gmail.com
Helo. You've got mail.
DeleteMy dear sir. please give me the hex( without input delay option). shimul111123@gmail.com
ReplyDeleteYou've got mail.
DeleteSorry sir. I already received this file. I want your 01: first release. Means without input delay function. Please send hex. shimnul111123@fmail.com
ReplyDeleteshimul111123@gmail.com
DeleteHello, you've got mail.
DeleteRespected sir, i am unable to compile this file,kindly send thr hex file to following mail id, mail.atlantis.com@gmail.com or mail.empire.com@gmail.com,thanking with Raja from India..
ReplyDeleteHello Rajesh. You've got mail.
DeleteThank you for a quick action,i received the mail successfully,and downloaded also,i will build this project,thank you for helping peoples through internet and email,the peoples "just like you" made me a master in electronics,thanking with Rajesh nair from India
DeleteThank you!
Deletei already build your CNC coil winder successfully...Thanks for that
ReplyDeleteThank you for your feedback Rajesh.
Delete