Omnimaga

General Discussion => Technology and Development => Other => Topic started by: Spyro543 on January 10, 2013, 08:07:15 am

Title: Programmable clock project
Post by: Spyro543 on January 10, 2013, 08:07:15 am
I only have a few minutes to post this so don't expect much detail.
This is a hardware project I HAVE ACTUALLY STARTED. It is a small device with a 2 line by 16 character LCD, powered by a pic18f26k20 and has 6 buttons. You will be able to do simple BASIC programming on it. Not much more for now, but pics later, maybe tomorrow.
Title: Re: Programmable clock project
Post by: Keoni29 on January 10, 2013, 08:12:30 am
"with 6 buttons, powered by a pic18f46k20 and has 6 buttons"
*writes it down* This is obviously very important :)
How big is it gonna be?
Title: Re: Programmable clock project
Post by: Spyro543 on January 10, 2013, 09:01:04 am
Oops. I'm not too sure about size, since it's all sprawled out on a breadboard now.
Title: Re: Programmable clock project
Post by: Keoni29 on January 11, 2013, 03:56:01 am
Will it fit behind the lcd module or is or is it gonna be a slightly larger, but still pocket size device? I guess you use DIP components. Can we have a look at the breadboard setup?
Title: Re: Programmable clock project
Post by: Spyro543 on January 11, 2013, 07:30:20 am
Sorry not now. I dismantled everything to set up a new breadboard setup, and I Won't be able to put it back together, because me and my friends are having a "nerd-fest" at my house (D&D and Minecraft from 3:00 pm today to noon tomorrow.
Title: Re: Programmable clock project
Post by: Spyro543 on January 11, 2013, 09:27:27 am
Sorry for double post, but mockups (yay) of what the UI could possibly look like.
The screen is 2 lines, each with 16 characters each.

Spoiler For LOTS OF MOCKUPS:
Mockup of main menu:
----------------
>CLOCK PROGRAM
 STOPWATCH INFO
----------------
CLOCK: Display and set the date and time.
PROGRAM: Edit and run programs.
STOPWATCH: Stopwatch :P
INFO: Shows free program memory and software version.

Mockup of clock function:
----------------
10:55:00 AM
01/11/13     SET
----------------
Press the right soft key (in this screen, it's labelled SET) to set the date and time.

Mockup of setting time:
----------------
SET TIME
<10>55:00 AM
----------------
The date section surrounded by < > can be changed. Use the OK button to scroll to next field.

Mockup of setting date:
----------------
SET DATE
<01>/11/13
----------------
The date section surrounded by < > can be changed. Use the OK button to scroll to next field.

Mockup of program slot list:
----------------
PRGM SLOT <1/3>
EDIT   RUN   CLR
----------------
EDIT: Edit the program.
RUN: Run the program.
CLR: Erase the program in the program slot.

Mockup of editing a program:
----------------
>
DEL 001/999  CMD
----------------
The ">" on the top line is where the command that is currently open is being shown.
DEL: Backspace. Clear this step in the program.
CMD: Open up a menu where commands can be selected and added to the program.
001/999: Shows what step is currently shown on screen. A program can have a maximum of 999 steps (commands).

Mockup of command menu:
----------------
<1/3> COMMAND
BACK        OPEN
----------------
There are three categories of commands: COMMAND (stuff like print and getkey), VARIABLE (variables, ->, DELVAR), and NUMERAL (numbers 0-9, +-*/=, and < > <= >= !=)

Mockup of stopwatch:
----------------
00:00.00
START      RESET
----------------
Top line shows amount of time measured.
START: Starts the stopwatch. Changes to "PAUSE" when stopwatch is running.
RESET: Sets stopwatch back to 0.

Mockup of info screen:
----------------
FREE MEM: 1024 B
VERS: 00.00
----------------

FREE MEM: How much memory is left in the data EEPROM.
VERS: Software version.

Spoiler For What all the buttons do!:
There are 6 buttons. Here's what they are:
2 Soft Keys: These act just like the soft keys on a phone. Their usage is shown at the bottom of the screen.
2 Arrow Keys (left and right): Navigate left and right or increase or decrease a value.
OK Key: Accepts currently highlighted option.
Menu Key: Shows the Main Menu.
Title: Re: Programmable clock project
Post by: imo_inx on January 11, 2013, 11:42:20 am
You need a keyboard port/dock for it to program.
Title: Re: Programmable clock project
Post by: Keoni29 on January 11, 2013, 11:43:07 am
You need a keyboard port/dock for it to program.
No. He told me that you can program it in a similar way you program on a calculator. By picking commands from lists.
Title: Re: Programmable clock project
Post by: imo_inx on January 11, 2013, 11:47:17 am
You need a keyboard port/dock for it to program.
No. He told me that you can program it in a similar way you program on a calculator. By picking commands from lists.
Yes, but you still need to type some text in for some programs. We actually discussed it already.
Title: Re: Programmable clock project
Post by: lkj on January 11, 2013, 12:06:53 pm
You could put everything you ever need to type in menus (e.g. numbers, letters for strings, ...).
Title: Re: Programmable clock project
Post by: Keoni29 on January 11, 2013, 12:57:22 pm
Indeed :)
Title: Re: Programmable clock project
Post by: Spyro543 on January 11, 2013, 02:20:50 pm
It would be nice to have a dock-like detachable keypad though. For entering lots o' numbers or letters.
Title: Re: Programmable clock project
Post by: ben_g on January 11, 2013, 02:43:31 pm
With only 1024 bytes of program memory, I don't think you'll need a lot of numbers or letters.
Title: Re: Programmable clock project
Post by: Spyro543 on January 11, 2013, 03:04:28 pm
1 Token = 1 Byte. So 1 Program will take up almost all the memory.
Title: Re: Programmable clock project
Post by: AngelFish on January 11, 2013, 03:31:15 pm
1 Token = 1 Byte. So 1 Program will take up almost all the memory.

In TI-BASIC, yes. Not if you use any sort of compressed format and dynamically decompress text as needed.
Title: Re: Programmable clock project
Post by: Nick on January 11, 2013, 04:50:35 pm
What will the use of the basic-programming functionality be? I don't really see a useful use ( :) )

and btw, you have 1024B, don't you use some of it for the lcd drives stuff and running program vars etc too? you don't have 1024B at all when running...
And another thing, what will you use your eeprom for? That can only be written for about 100.000 times so don't store anything constantly changing in there, since you don't want to have to open your device up to replace the eeprom
Title: Re: Programmable clock project
Post by: Spyro543 on January 11, 2013, 08:24:29 pm
the EEPROM has 1024 bytes. I actually have 64 KB of program space.
Title: Re: Programmable clock project
Post by: Nick on January 12, 2013, 02:38:05 am
you didn't carefully read what I told you. How many bytes RAM do you have? Where will you save your Basic programs? And what will you use the EEPROM for?
Title: Re: Programmable clock project
Post by: Spyro543 on January 12, 2013, 09:07:24 am
I have 3936 bytes of RAM. The programs will be saved in the EEPROM.