Chess clock

Go To Last Post
89 posts / 0 new

Pages

Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

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

 

 

now we are trying to put 2 buttons to activate one counter and one activate the other, but when i push one the other will stop 

$crystal = 8000000

$regfile = "m328Pdef.dat"

$hwstack = 40
$swstack = 32
$framesize = 52

Dim Digitos(8) As Byte                                      'Se dimensiona variable array con 8 elementos tipo byte
Dim Numero As Word
Dim I As Byte

Dim D1 As Byte
Dim D2 As Byte
Dim D3 As Byte
Dim D4 As Byte
Dim D5 As Byte
Dim D6 As Byte
Dim D7 As Byte
Dim D8 As Byte                                              'dimension variable byte para el valor de cada dígito

D1 = 0
D2 = 0
D3 = 0
D4 = 0

D5 = 9
D6 = 9
D7 = 9
D8 = 9

Const Reg_decode_mode = &B1111100111111111
Const Reg_scan_limit = &B1111101111111111
Const Reg_intensity = &B1111101011111111
Const Reg_shutdown = &B1111110011111111

Config Portc.0 = Output                                     'Configuración puerto C como salida
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
Waitms 100

If D1 < 9 And D5 <= 9 Then                                  'Comienza conteo 0000 - 9999 y 9999 - 0000

Incr D1
Decr D5
   Elseif D1 = 9 And D2 < 9 And D5 = 0 And D6 <= 9 Then
   Waitms 100
   D1 = 0
   D5 = 9
   Incr D2
   Decr D6

   Elseif D2 = 9 And D3 < 9 And D6 = 0 And D7 <= 9 Then
   Waitms 100
   D1 = 0
   D2 = 0
   D5 = 9
   D6 = 9
   Incr D3
   Decr D7

   Elseif D3 = 9 And D4 < 9 And D7 = 0 And D8 <= 9 Then
   Waitms 100
   D1 = 0
   D2 = 0
   D3 = 0
   D5 = 9
   D6 = 9
   D7 = 9
   Incr D4
   Decr D8

   Elseif D5 > 0 Then
   Decr D5

End If                                                      'Finaliza conteo 0000 - 9999 y 9999 - 0000

Digitos(8) = D8
Digitos(7) = D7
Digitos(6) = D6
Digitos(5) = D5
Digitos(4) = D4
Digitos(3) = D3
Digitos(2) = D2
Digitos(1) = D1

Gosub Mostrar
Wait 1

Loop

Mostrar:
   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 &B1111000100000000
     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

 

 

 

 

 

 

 

 

 

Attachment(s): 

Last Edited: Tue. May 3, 2022 - 06:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That sounds easily possible in Bascom. There are a few regular contributors who use Bascom who should be able to help. 

 

You need to sketch out a specification for what you want to achieve. Obviously I guess you'll want a timer that accurately counts seconds. Some button input reading code and some output display code. The latter is going to be the most complex bit of all so what kind of display do you want to present? 7-segment LEDs perhaps? If so how many digits? Or do you want to display on LCD? If so is it enough to use a couple of lines of characters? Or do you want to go all out and display something looking like an analogue clock by drawing pixels to show the 60 second markings, pointers etc? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greetings and Welcome to AVR Freaks,

 

I would start by writing down all the things that a chess clock does. There is a button that the players push, right? What happens when that button is pushed? Then, what happens while the timer runs? Then what happens when the timer times out?  Does it have to do anything else like indicate which player the timer is active for?

 

You might look in the tutorial section for tutorials on "state machine" or "finite state machine" or "FSM".

 

If you can make it so that one timeout interval fits all games, then you don't have to change the length of the interval, and it becomes really easy. If you have to be able to set that interval, then start out with the interval time as a variable. Once the timer is working, you can then figure out how to load different timer values into the machine, maybe via USB from another computer. That raises the complexity level pretty high for a starter-project, though.

 

Good luck on your project.

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

Last Edited: Sat. Apr 9, 2022 - 09:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Start hardware design with 2x20pF and a tiny crystal of 32kHz, soldered to PB6 and PB7.

Then, set AS2 of ASSR.

 

This will produce precise 1Hz, the rest is easy /hope/.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to the Forum.

 

Are you using an Arduino Nano or another Arduino HARDWARE, even though you are not using the Arduino language for the programming?

 

M238, M328p, M328pb ???  There are several versions of the Mega328, and it does matter which one you are using.

 

Have you done some other programs with Bascom and the M328?

(Flashed an LED, read a push button switch, etc.)

 

Have you ever used an interrupt subroutine, for example an interrupt that fires once every 5 mSec?

 

As asked above, what are you going to use for the display?

 

How many days / weeks / months do you have to complete this project?

 

JC

 

Last Edited: Sun. Apr 10, 2022 - 01:01 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey, no, i have to do a custom board, the atmega 328p is the one im ussing, i have done other programs but they are not complex at all, i never done a subrounite interrupt, for the display im using a 7 segments led 4 for each timer ( for minutes and seconds), i have a time lapse of 7 months, i have to end in november. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello, its not that complex the idea its to have 2 display made of 7-segments led display ( so they can show minutes and seconds so they 4 digits each one) and havien 2 butons to pass the time to the other player, another one for restarting the timers and, one for turn on and off, but nothing more, the principal idea its that, maybe some mode that you can change the time from 2minutes to 5 if you whant somenting like that, nothing more

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello, the idea its the clock have 2 displays made out with 7-segments displays (4 for each one, to show minutes and seconds) 2 buttons to activate the other player timer, when it gets to zero it just end determinating that the player has lost, a button to reset the timers, and nothing more maybe a buton that can make change the time from 2 minutes to 5 minutes for example. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


xXThiagox3dDXx wrote:
the idea its the clock have 2 displays made out with 7-segments displays (4 for each one, to show minutes and seconds)

For the displays, is it allowed to use these ones? Two of these can be controlled from two wire interface known as I2C. But this means you have to use TM1637 library. 

 

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?” - Brian W. Kernighan
“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint-Exupery

Last Edited: Sun. Apr 10, 2022 - 03:01 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xXThiagox3dDXx wrote:
show minutes and seconds

 

It should be also hours, guess.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, that ones are allowed, that library i supose that is for bascom, where did i get it? And another question? They are easy to use? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, isnt whort the rule of chess say that the normal time is 10 minutes for each player, 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use 7S LED display. Either 2 modules, or discrete components (8 singles, or 4 double or 2 quadruple).

What is your choice?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My bad I didn't read bascom earlier, so library is no go. Does not exist.

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?” - Brian W. Kernighan
“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint-Exupery

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would likely start with a Nano on a breadboard, to work out the hardware and the software, (build a prototype).

 

When it works, then work on a PCB for the project, which is a big project on its own if you haven't done that before.

 

Heisen showed a 4 digit, 7-Segment, display with an I2C interface.

They also come with an SPI interface and a Max 7219 driver chip built into the little display board.

I would use the SPI interface and the Max 7219 driver chip.

You can put both of the displays on the same SPI bus, and have a separate Chip Select line to control which one the micro is sending data to.

 

Those displays, by the way, draw a lot of current.

The little 5V regulator on a Nano won't power the Nano and two of those 4 digit displays, so they will need their own power supply.

(You need a power supply for the displays and the Nano)

 

Draw a Box Diagram of the project.

The Micro, (or the Nano, for starters); the power supply, the two displays, 4 push button switches, a piezo beeper, and an LED or two.

See how many I/O pins the project will require, and make sure that you have enough I/O pins for it all.

 

If you break the project down into small parts then it will all be doable.

 

JC 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, thats sounds nice, im thinking that im not sure how to pass the data from the chip to show in the display, i mean i dont know how to make the display show the time, sorry for asking a lot, i try to be not so heavy whit the questions 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As said above those display modules have their own little intelligent micro ("backpack") on board so the AVR you program will "talk" to them by sending commands like "set digit 2 to show a 9"and that kind of thing. The actual connection is either two wire (clock and data) known as inter-integrated-circuit (IIC or usually I2C) or three wire (clock, data out, data in) known as serial peripheral interface (SPI). Most AVR have separate internal blocks that can do I2C or SPI. So whatever display module you choose you should be covered but make sure to pick either a mega AVR or an Xmega AVR. Don't pick a Tiny AVR. They may look smaller, cheaper, less complex but they don't have things like I2C/SPI but a half arsed thing called USI that makes doing either MORE complicated.

 

In a previous post I said the display would be the most complex part of the design. It is. It's going to be quite a challenge if this is your first AVR project! 

 

At least using four grouped 7 segs with their own controller takes away some of the complexity. If you were trying to connect eight 7-seg displays direct to the AVR it would get very complex indeed! 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, now for geting the reading of the time i was thinking of an rtc a (real time clock) the avr whit the all funcionts working will dilate the time so 5 minutes for the avr will no be 5 minutes real, so i thinked for clock data using one of those, for the leds i think 2 7sleds of 4 each one should do the trick, for making the leds i should multiplex ? my teacher talked about that but i dont sure how it works 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xXThiagox3dDXx wrote:

No, isnt whort the rule of chess say that the normal time is 10 minutes for each player, 

 

I find this :

Time controls for the World Championship games are 120 minutes for the first 40 moves, followed by 60 minutes for the next 20 moves and then 15 minutes for the rest of the game with an increment of 30 seconds per move starting on move 61.

You could display mm.ss and mmm.f  when over 99 minutes.

 

xXThiagox3dDXx wrote:

Hey, no, i have to do a custom board, the atmega 328p is the one im ussing, i have done other programs but they are not complex at all, i never done a subrounite interrupt, for the display im using a 7 segments led 4 for each timer ( for minutes and seconds), i have a time lapse of 7 months, i have to end in november. 

Does your board include those 7 segment LEDs, or do you need to build an add-on ?

 

I did see this go past at Adafruit  - a nice LCD numeric display.  ( but currently showing out of stock ..)

https://www.adafruit.com/product...

 

Addit: Similar, but available and a bit cheaper is this 10-Digit 16-Segment LCD Display Module 

https://www.aliexpress.com/item/...

Last Edited: Sun. Apr 10, 2022 - 09:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xXThiagox3dDXx wrote:
the leds i should multiplex

 

I did it many times. Start with CA or CC choice (Common Anode/Cathode).

For CA, I am using 74HC138, and 8 PNP transistors or tiny Mosfets. This, because you have 8 columns and 8 rows, a total of 16 pins.

With HC138 the number is reduced to 12 pins, which is affordable for any ATmega.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can make it all in the same board, but i think is more practical to have it in another just to make it more ergonomic

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
M238, M328p, M328pb ???  There are several versions of the Mega328, and it does matter which one you are using.
AVRe+ is long lead time whereas some AVRxt is less especially AVR Dx; if the tech school has enough stock, including spares for FUBAR, then no issue.

AVRxt :

  • easier to recover than AVRe+
  • increased reliability (injection current)

BASCOM-AVR has some (most?) AVRxt.

 

Lead Time | World's Largest Inventory of Microchip Products

MEGAX | BASCOM-AVR

AVRX | BASCOM-AVR

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

grohote wrote:
Use 7S LED display.
Are LED sunlight readable?  (sun shade?)

Use case is outdoor table tops or furniture; IIRC, some cities have chess table concrete furniture at parks.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
I would likely start with ...
Requirements (posts #2 and #3) then proceed to a design; both are ideally executable (requirements on a white board or projection screen during a walk through, design on a PC/notebook/tablet/smart phone/feature phone/workstation/server)

Requirements state the information flow between the machine and the operators and/or other machines; information is defined as data with meaning.

Design is the control and data flows within the machine (hierarchical state machines); when the design is complete, precise, and correct then port to an AVR.

 


Ragel State Machine Compiler

Ragel doesn't have a BASIC code generator.

ragel/src at master · adrian-thurston/ragel · GitHub

Ragel due to

 

modeling - Modern Embedded Software | Quantum Leaps

Dual Targeting and Agile Prototyping of Embedded Software on Windows - Quantum Leaps (the model is executable)

 

edit : BDD is Behavior-Driven Development

Cucumber Open | Software Testing Products and Solutions | SmartBear

Cucumber Open - Get Started with BDD Today | Cucumber

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Apr 14, 2022 - 02:12 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

grohote wrote:
Use 7S LED display.
Are LED sunlight readable?  (sun shade?)

Use case is outdoor table tops or furniture; IIRC, some cities have chess table concrete furniture at parks.

 

 

Good point, plus most chess clocks are battery powered, so low drain matters.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That are the micro you use for multiplexing? Are another one that can be usefull? For multiplexing two 4digits 7segments led

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xXThiagox3dDXx wrote:
Are another one that can be usefull?
Yes

Smart Alphanumeric Displays (Broadcom)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xXThiagox3dDXx wrote:

That are the micro you use for multiplexing? Are another one that can be usefull? For multiplexing two 4digits 7segments led

#20 lists some additional hardware to help the MCU

 

if you want to drive say 8 digits of 7 segment LED, with 8 decimal point options, that's a  matrix of 8 lanes for X + 8 lanes for Y so needs 16 MCU pins .

 

Because one side of that matrix is a 1-of-8  you can save some pins, by using some simple LOGIC parts.

eg 74HC138 is a 3 line to 8 demux, so you can save 5 pins

74HC4017 is a decade one-high counter, so it needs a CLK and reset connection for up to 10 way multiplex. saves 6 pins

74HC595 is a 8 bit shift register, and CLK and DAT connections can support up to 8 way multiplex. saves 6 pins

 

 

The other aspect of LED multiplex is current drive.

if you drive for only 1/8 of the time, 10mA of drive needs 80mA peak per pin, which is outside generic MCU's specs, and outside simple LOGIC parts too.

You can either add discrete transistors/mosfets, or you can buy parts like  PIC6C595, which are 8 bit shifters with 100mA sink drive ability.

 

Or, you might decide that roll-your-own LED array driver is too much work, and instead select a module like

https://www.adafruit.com/product... uses  HT16K33 chip, to do all the work, mounted on a Breakout PCB already : 16x8 LED Matrix Driver

This part has 

•     Operating voltage: 4.5V~5.5V
•     Integrated RC oscillator
•     I2C-bus interface
•     16×8 bits RAM for display data storage
•     Max. 16×8 patterns, 16 segments and 8 commons  (20mA source 160mA sink, so high LED drive is all done for you)
•     R/W address auto increment
•     Max. 13×3 matrix key scanning
•     16-step dimming circuit
•     Selection of 20/24/28-pin SOP package types

 

Since this is for a clock/timer, I'd ask the tutor about using LCD display instead of LED.

 

* Adafruit link corrected. *

Last Edited: Mon. Apr 11, 2022 - 03:20 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

about the real time clock? (rtc) do you know how to opperate it and use it in the project?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

about the real time clock? (rtc) do you know how to opperate it and use it in the project?

That isn't necessary, and is an extra complexity.

 

Typically, one runs the micro with an external crystal, (20 MHz, for example).

That gives you a very precise time base.

 

One then uses one of the micro's timer/counters to generate an interrupt once every 1, or 2, or 5, or 10... mSec.

In this case, an interrupt once every 5 mSec would be a great "timer tic" for the project.

Every interrupt you either set a flag for the Main Loop to process, or just increment a counter within the interrupt routine.

That counter is your master timer, from which you measure your 5 min or 10 minute intervals, etc.

 

The reason you can do this is because a player hits a start button, and that starts the clock.

 

A Real Time Clock chip / module gives you the date and time of day.

You don't need that data.

You just need to count time intervals.

 

JC 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xXThiagox3dDXx wrote:

about the real time clock? (rtc) do you know how to opperate it and use it in the project?

 

A RTC is somewhat optional here - you certainly should use at least a crystal on your MCU, which your AVR board likely already has ?

( the on chip oscillator will not be precise enough)

 

You do not need the hours/weeks/months/leap year handling of a RTC on a chess clock, and a crystal will give good enough precision for timing players.

Allowing for as RTC means you could re-purpose this later, but a RTC is not a requirement.

 

If you do have to use LED Displays, the current drain to the LEDs will dominate, so you'd set up some multiplex tick like 1ms per step, for a 125Hz refresh rate over 8 scan steps.

eg from a 16MHz crystal, you divide by 16000, to 1ms, then divide again by 1000 to 1 second ticks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:
outdoor table

 

Then we have no full requirement list. If battery operated- it is another project.

 

LCD or OLED, will not be cheap.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


grohote wrote:

gchapman wrote:

outdoor table

 

 

Then we have no full requirement list. If battery operated- it is another project.

 

LCD or OLED, will not be cheap.

 

LCD segment displays let the OP choose size vs price.

Small LCDs can be quite cheap.

 

For best user experience, I'd choose a larger-end LCD Segment module,  maybe something like this

https://www.aliexpress.com/item/...

 

 

that has a largish 18mm high character 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


I've been reading the wikipedia article on chess clocks with interest. Also this online chess timer proved instructive.

 

I guess you initially thought about making what wikipedia call the crude version with LED displays. I've seen that the majority of digital chess timers use large segment type reflective LCD displays. These have the benefit of microamp level current consumption making reasonable life battery operation with possible.

This is just about the pinnacle of what is offered. I suppose you are looking at something simpler.

 

 

Here's an example 4-digit LCD with colon: https://uk.rs-online.com/web/p/lcd-monochrome-displays/8885657

Drivers with with I2C interface for these displays are available.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

You remind me of their search. Yet, I need to buy something from them sometimes, but search...

 

Disgusting! Aliexpress does have the WORST SEARCH possible. Do specify lcd display, and it will find for you 7-10 pages of LED display.

Whatever you search, it will be more than 5 pages of usual rubbish, blended with old search of yours (perhaps to check if you changed a mind).

 

IMPOSSIBLE to search anything, yet they claim it as 'advanced' search. For example, you can not find atmega* unless you specify exact device, numbers and letters.

(Any similarity with our forum search is NOT a pure coincidence.)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would suggest you break your project in to two clock projects, each one has a start/stop switch and a display, keep it simple, once you have one working as needed, then build the other identical clock and combine the two switches so pushing it starts one clock, stops the other, and vis-versa....  

Good luck with your project.

Jim

 

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Who-me wrote:
that has a largish 18mm high character 
12 mm for an overstock(?) segment LCD :

GH-2794P: Arndt Electronics : 7-Digit LCD Positive Reflective with 2 Decimal Points SMD : Opto & Illumination (Jameco)

mega48 drives a 3.5 digit segment LCD :

AN8103 AVR340: Direct Driving of LCD Using General Purpose IO using tinyAVR and megaAVR devices | Application Note | Microchip Technology

which are 13 mm high at Mouser :

3.5 LCD Numeric Display Modules – Mouser

 

In the midst of the AVRe+ shortage, mega329 are in stock.

ATMega329 | Octopart

with AVR Butterfly and a sale at Newark :

ATAVRBFLY | Octopart

 

XMEGA B has a character map segment LCD drive; am surprised at the stock level of this XMEGA as XMEGA are long lead time :

ATxmega64B | Octopart

XMEGA Lead Time, Dec'20 | AVR Freaks

 


edit :

Segmented LCD Solutions | Microchip Technology

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Mon. Apr 11, 2022 - 02:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey, no, i have to do a custom board, 

Whatever you do, do NOT start laying out any board, until you have a fully working version on your breadboard.   You will find and correct many mistakes before then, and a PCB will not allow you to correct big mistakes and afterthoughts.

Note: This is the approach, not the solution.

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Mon. Apr 11, 2022 - 03:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

grohote wrote:

 

You remind me of their search. Yet, I need to buy something from them sometimes, but search...

 

Disgusting! Aliexpress does have the WORST SEARCH possible. Do specify lcd display, and it will find for you 7-10 pages of LED display.

Whatever you search, it will be more than 5 pages of usual rubbish, blended with old search of yours (perhaps to check if you changed a mind).

 

IMPOSSIBLE to search anything, yet they claim it as 'advanced' search. For example, you can not find atmega* unless you specify exact device, numbers and letters.

(Any similarity with our forum search is NOT a pure coincidence.)

 

 

Hehe, yes, it is rather broken.

In this case, after many iterations I found segment LCD search, then sort by price, gives the least broken results. Even then, sort by price is somewhat nominal and random.

 

I suspect they have significant revenue generated by 'jump the queue' payments from companies, as they distort the initial search.

Of course, such short term greed damages things enough to ultimately drive users away.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

True, sort by price does help. Also, try to use Google picture search, you can be surprised how Google can do it.

Of course, some pictures may be obsolete, but, if you specify aliexpress lcd segment you will be rewarded with a lot of offers (Aliexpress itself can not provide).

 

For example such beauty 1.3$

 

 

or this module, 3.5$

 

 

Edit: both are without b/l

Last Edited: Mon. Apr 11, 2022 - 08:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey, a question, how i write the code for the max 7219? the idea is just to show numbers in the screen.  Its in bascom and for the atmega328p im tryng to do this work in proteus for star,t, after maybe traspassing to real life.

Last Edited: Mon. Apr 11, 2022 - 10:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xXThiagox3dDXx wrote:
max 7219

 

Do you have a module with this chip?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No its the 2 sepearated tje chip for 1 way and the screen for other, anyway i just wanna understand how to code it in bascom

Last Edited: Mon. Apr 11, 2022 - 10:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

grohote wrote:

xXThiagox3dDXx wrote:
max 7219

 

Do you have a module with this chip?

 

do a search…. eBay and Ali express 

 have them

 

jim

 

edit: correct a typo

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Last Edited: Tue. Apr 12, 2022 - 10:30 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Not for me. I have some Matrix modules with this chip, they are blue and fancy:

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

xXThiagox3dDXx wrote:

Hey, a question, how i write the code for the max 7219? the idea is just to show numbers in the screen.  Its in bascom and for the atmega328p

Could not be simpler...

 

https://www.mcselec.com/index2.p...

Ross McKenzie, Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried that code but it seems to have some errors, have another example?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xXThiagox3dDXx wrote:
it seems to have some errors
What? Where?

 

Do a search with "7219"... that is not the only mention, for example...

 

https://www.mcselec.com/index2.p...

Ross McKenzie, Melbourne Australia

Last Edited: Mon. Apr 11, 2022 - 11:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey, here i send the picture where the error is shown in the bascom software.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Im havent been capable of making the code work, i serched for examples but they are not very clear, i ask again becose i dont know, how is the function to show number in a 4 digit 7ls display, example, that the screen show the number 1990 just that 1 display, 

 

Its in the atmega328p 

Written in bascom 

And the micro max7219 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try this In Portuguese :

 

Tutorial sobre programação com Bascom
 

And this for teaching about Multiplex :

 

Tudo sobre Leds e displays de Leds Multiplexados
 

Paulo

Pages