hello everyone, you will notice that the old text that came out here was eliminated in order to be able to put together something more decent and more specified to make it easier for you to help and that you can observe the progress of the project as it happens.
overall concept: The idea is to make a chess clock that presents a time of 5 minutes for each player, when a player presses the button on his side, the time of the other player of 5 minutes starts to run slowly until it reaches 0, if the player who has time running press the button on your side will make your opponent's time run, the idea of this is that players don't take forever to make their moves
a little video that show what are how a chess clock works https://www.youtube.com/watch?v=...
conditions:
the project has specific conditions to be carried out, since it is a school project
arduino is forbidden for the final project, since it must be done on a custom board, but it can be used to test things, as long as the bascom language is used and not the language that is commonly used in arduino
which brings us to the next point, the programming language that is being used is bascom, and the bascom avr compiler is being used I attach a link to the bascom avr page so that you can locate which one it is
https://www.mcselec.com/index.ph... are working with the demo version that allows a code of up to 4kb
the time I have for the completion of the work is until November of this year, practically at the end of the course
specs:
In this section I will present the materials that I count for the project, such as the display chip etc, for the simulations I often use generic materials,
the head of the project and the most important component is the microchip -ATmega328p
this component arose by recommendation from this forum, it is currently the one we are working with and trying to understand, it is quite good because here in Argentina it is not very expensive and it would allow me to do what I need the component in question is the max7219 that would be used to control the 7-segment led screens.
for the screen as it is mentioned above and it is a simple deduction when seeing the text above, the idea is to use two 7-segment led screens of four digits each, you are being a common cathode
to practice we have a common protoboard that is used to test without the need to solder anything
I have thought about the idea of using an rtc although I haven't tried it or read much about it yet, we consider it necessary for the project because the micro with the amount of functions and things that are going to be asked of it will be unable to count 5 minutes in a real way, that's why the rtc (real time clock)
for the battery we didnt decide what to use to power it up, probably batterys or a rechargable battery from cellphones
I am going to attach photos of the components and show a code which we are trying to edit but we are still a bit lost in its operation
An individual from the forum sent us a pdf that explained the operation of the max7219 and showed an example code that allowed reading through the adc a value in volts that passes through a potentiometer, a kind of multimeter up to 5v
acct we already make the multiplexing and make the two screens work, now we are doing a counter from 0 to 9999 and one from 9999 to 0000, to ha testing in the screens, we have a working code for the 2 screens, sugest on how to do the code
$crystal = 8000000 $regfile = "m328Pdef.dat" $hwstack = 40 $swstack = 32 $framesize = 52 Dim Digitos(8) As Byte Dim Numero As Word Dim I As Byte Const Reg_decode_mode = &B1111100111111111 Const Reg_scan_limit = &B1111101111111111 Const Reg_intensity = &B1111101011111111 Const Reg_shutdown = &B1111110011111111 Config Portc.0 = Output Config Portc.1 = Output Config Portc.2 = Output Max_data Alias Portc.0 Max_load Alias Portc.1 Max_clock Alias Portc.2 Max_load = 1 Numero = Reg_shutdown Gosub Sai_max Numero = Reg_decode_mode Gosub Sai_max Numero = Reg_intensity Gosub Sai_max Numero = Reg_scan_limit Gosub Sai_max Do Digitos(8) = 1 Digitos(7) = 1 Digitos(6) = 0 Digitos(5) = 0 Digitos(4) = 1 Digitos(3) = 8 Digitos(2) = 9 Digitos(1) = 9 Gosub Mostra Wait 2 Loop Mostra: Numero = 0 For I = 8 To 1 Step -1 Numero = Digitos(i) Select Case I Case 1 Numero = Numero Or &B1111100000000000 Case 2 Numero = Numero Or &B1111011100000000 Case 3 Numero = Numero Or &B1111011000000000 Case 4 Numero = Numero Or &B1111010100000000 Case 5 Numero = Numero Or &B1111010000000000 Case 6 Numero = Numero Or &B1111001100000000 Case 7 Numero = Numero Or &B1111001000000000 Case 8 Numero = Numero Or &B1111000000000000 End Select Gosub Sai_max Next I Return Sai_max: Max_data = 0 Max_clock = 0 Max_load = 0 Shiftout Max_data , Max_clock , Numero , 1 Max_load = 1 Return End
this is all that we have here, I really want to thank you for all the support already given, I hope that it can continue until it is finished, and leave everything documented for anyone who can achieve it after following me
















