Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 04:20 07 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Help with super clock

Author Message
heppy36

Regular Member

Joined: 29/07/2011
Location: Australia
Posts: 54
Posted: 11:22pm 04 May 2017
Copy link to clipboard 
Print this post

Hi After using my micromite backpack for a while,I decided to turn it into the superclock,I bought the correct RTC,uploaded the Bas file,when I run it I just get errors?
Error: Invalid font #2 and it wont run?have I missed something?
Thank you
Martin

Heppy
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 11:26pm 04 May 2017
Copy link to clipboard 
Print this post

Hi Martin,

You need to ensure that in your code somewhere that Font 2 has been defined.

Look for a 'DEFINEFONT #2' with a matching 'END DEFINEFONT' (with a bunch of numbers in-between).

If it is missing then it will generate the error message you are seeing.

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 11:42pm 04 May 2017
Copy link to clipboard 
Print this post

As WW says you need to define the fonts. The file SuperClockFonts.bas does that and has to be loaded into the Library. Geoff's website has all the info. See down the bottom of the article.
 
heppy36

Regular Member

Joined: 29/07/2011
Location: Australia
Posts: 54
Posted: 11:45pm 04 May 2017
Copy link to clipboard 
Print this post

I just downloaded the Superclock program from the website,it come with 2 files SuperClock.bas and SuperClockFonts.bas,am I ment to run them together or something?
I have tried runing both of them with no luck (both come up with errors)
Thanks
Heppy
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 12:09am 05 May 2017
Copy link to clipboard 
Print this post

The procedure is reasonably straight forward:
• Using AUTOSAVE or XMODEM load the file SuperClockFonts.bas into MMBasic and then save it to the library with the command LIBRARY SAVE.
• Then using AUTOSAVE or XMODEM load the file SuperClock.bas into MMBasic and issue the command RUN.

You need to do this because the combined program+fonts are too big to fit into the memory at the same time. When you load the fonts only into the library they are compressed which then leaves you with enough free memory to load the main program.

Geoff

Geoff Graham - http://geoffg.net
 
heppy36

Regular Member

Joined: 29/07/2011
Location: Australia
Posts: 54
Posted: 12:22am 05 May 2017
Copy link to clipboard 
Print this post

I used xmodem and sent them both to the chip,can I move it into the library from here.or do I delete and start again?
Thanks for the help

Heppy
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 12:41am 05 May 2017
Copy link to clipboard 
Print this post

Delete and start again (use the NEW command to do this).

Load the font file first and use LIBRARY SAVE. After that load the program file and RUN the program.
Geoff Graham - http://geoffg.net
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 12:45am 05 May 2017
Copy link to clipboard 
Print this post

What you need to do, is first send SuperClockFonts.bas to the Micromite.

Then got to the command prompt & Type Library Save.

That moves SuperClockFonts.bas to the Library area.

Then send SuperClock.bas to the MM & just run it.
 
heppy36

Regular Member

Joined: 29/07/2011
Location: Australia
Posts: 54
Posted: 03:58pm 05 May 2017
Copy link to clipboard 
Print this post

I cant get back into the maximite,on reset I do the ctrl-c but it wont let me type anything,I can see the light flashing when I type its like the maximite is not talking back.I get the error on the screen

> Micromite MKII MMBasic Ver 5.2
Copyright 2011-2016 Geoff Graham

[304] Text MM.HRes/2, 5, " " + Title(ClockNbr) + " ", CT, 2, 1, c.title, c.background
Error: Invalid font #2
>

but I cant take control?
Heppy
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 04:27pm 05 May 2017
Copy link to clipboard 
Print this post

The program SuperClock.bas has the option of AUTORUN ON. This is what is causing the trouble for you. Have you considered reading the manual?
 
heppy36

Regular Member

Joined: 29/07/2011
Location: Australia
Posts: 54
Posted: 05:43pm 05 May 2017
Copy link to clipboard 
Print this post

I thought the Ctrl -c was the only thing needed to stop the program,then I could change the option on command?The manual doesn't explain stuff ups (which I kind of caused)

Heppy
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 06:28pm 05 May 2017
Copy link to clipboard 
Print this post

Heppy
I don't know the exact solution without reading the manual. It's your project. Have a go.

The football is starting again. Gotta go. North Melbourne leading Adelaide 64 to 0 at end of Q1.

Bob
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5914
Posted: 06:46pm 05 May 2017
Copy link to clipboard 
Print this post

Do you have OPTION AUTORUN ON set?
Don't set that until you are sure every thing is working.
Do you have a display connected and configured?
There have been some instances where a lack of display when it is configured for one causes issues.

From page 16 of the micromite manual:

  Quote  Resetting MMBasic
MMBasic can be reset to its original configuration using either one of two methods:
1. The chip can be reprogrammed with the Micromite firmware using a PIC32 programmer.
2. Sending a stream of exclamation marks (!) to the console Rx pin at 34800 baud during its startup.
In the first 100 mS after powering up the Micromite will set the console to 34800 baud and check to see if
an exclamation mark is received. If so, it will then wait for two seconds to see if it is going to get more
than 30 of them in that time. If this is the case the Micromite will reset itself to its initial defaults and
send the message "MMBasic reset completed" to the console.
This reset can be accomplished by simply setting the terminal emulator to 38400 baud and holding down
the exclamation key while powering up the Micromite (on most keyboards this requires holding down
shift and the number one key). This will even work if the console has been set to a non standard baud
rate.
Either method will result in the program memory and saved variables being completely erased and all options
(security PIN, console baud rate, etc) will be reset to their initial defaults.


Jim
VK7JH
MMedit   MMBasic Help
 
heppy36

Regular Member

Joined: 29/07/2011
Location: Australia
Posts: 54
Posted: 10:22pm 05 May 2017
Copy link to clipboard 
Print this post

Thank you ,that worked a treat,the screen is white on the maximite and I back to the
Micromite MKII MMBasic Ver 5.2
Copyright 2011-2016 Geoff Graham

>
On the terminal

Not sure if my usb serial my have died,when I type nothing comes up (in tera term),the light flashes on the usb adaptor and I do get the command prompt?
Thanks again for the help (sorry for been a noob)thought it was straight forward
Martin
Heppy
 
heppy36

Regular Member

Joined: 29/07/2011
Location: Australia
Posts: 54
Posted: 11:31pm 05 May 2017
Copy link to clipboard 
Print this post

Ok it was my adaptor,and I got it all clean
If I open mmedit and paste in the code the superclockfonts.bas ,then list it il looks like

> list
DeF50000000000000 0000 0000 08111 000000000001001100 00000 0000
18 00F80300 0011000600000
40 B8 701C0E60 E80C800 00000 00000 000000000000000000 0000
00C0FF01C011000 00000 00001011110000000 0000 0000 00000 0000000000030000
0100C001 C00CC01101FF00 0000
000000000 00000000000F00FF0 0000 7700 7C800000EE76000000000F0C 00000 0
0E007F0E
00000000
EC0 0EC0000E 0 7CF0 00000 030000000000000000 00011 C666
E0000070 00088000 000 00
000000080 00C00F0C 00000007 00000000

>
not what it should look like?


Heppy
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 12:33am 06 May 2017
Copy link to clipboard 
Print this post

  heppy36 said   Ok it was my adaptor,and I got it all clean
If I open mmedit and paste in the code the superclockfonts.bas ,then list it il looks like

> list
DeF50000000000000 0000 0000 08111 000000000001001100 00000 0000
18 00F80300 0011000600000


A font will look like this in MMedit...

(When pasting code, use the code button above, gives you the box & formatting).

[Code] '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' embedded fonts
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Font: Hom_16x24_LE
' Includes all ASCII characters
DefineFont #2
5F201810 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 80010000 80018001
80018001 80018001 00018001 00010001 00000000 80010000 00008001 00000000
00000000 00000000 700E0000 700E700E 2004700E 20042004 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 20010000 20012001
20012001 F80F2001 40024002 F01F4002 40024002 40024002 40024002 00000000
00000000 00000000 80008000 E8018000 08041802 00040004 E0010002 08001000
08080800 E00B100C 80008000 80008000 00000000 00000000 00070000 40108008
40104010 1C078008 0007E000 88007038 04010401 88000401 00007000 00000000
00000000 00000000 00000000 00000000 C004A003 00040004 00060002 20113009
4010C010 A0086010 00001807 00000000 00000000 00000000 70000000 E0007000
8001C000 00000001 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 10000000 20002000 40004000 80004000 80008000 80008000
80008000 40004000 20004000 10002000 00000000 00000000 00080000 00040004
00020002 00010002 00010001 00010001 00010001 00020002 00040002 00080004
00000000 00000000 80000000 80008000 F007980C 6003C001 180C3006 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
80008000 80008000 FC1F8000 80008000 80008000 00008000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 C001C001 00038003 00040006 00000000 00000000 00000000 00000000
00000000 00000000 FC1F0000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 C001C001 0000C001 00000000 00000000 00000000 08000000 10000800
20001000 40002000 80004000 00018000 00020001 00040002 00080004 00000008
00000000 00000000 00000000 3006C001 08081004 08080808 08080808 08080808
08080808 30061004 0000C001 00000000 00000000 00000000 00000000 800E8001
80008000 80008000 80008000 80008000 80008000 80008000 0000F80F 00000000
00000000 00000000 00000000 200CC003 10101010 10001000 40002000 00018000
00040002 08100008 0000F81F 00000000 00000000 00000000 00000000 3008C007
10001000 20001000 3000C003 08000800 08000800 300C0810 0000C003 00000000
00000000 00000000 00000000 A0006000 20012001 20042002 20082004 20102008
2000F81F 20002000 0000F801 00000000 00000000 00000000 00000000 0008F00F
00080008 C00B0008 1000300C 08000800 08000800 30181000 0000C007 00000000
00000000 00000000 00000000 0003F000 00040006 E0090008 080C100A 08080808
08080808 10060804 0000E001 00000000 00000000 00000000 00000000 1010F01F
20002010 40002000 40004000 80004000 80008000 00010001 00000001 00000000
00000000 00000000 00000000 2004C003 10081008 10081008 E0072004 08101008
08100810 300C1008 0000C003 00000000 00000000 00000000 00000000 3006C001
0808180C 08080808 28061804 0800C801 10000800 60001000 0000800F 00000000
00000000 00000000 00000000 00000000 00000000 C001C001 0000C001 00000000
00000000 C001C001 0000C001 00000000 00000000 00000000 00000000 00000000
00000000 C001C001 0000C001 00000000 00000000 C001C001 00038003 00040006
00000000 00000000 00000000 00000000 60001800 00068001 00300018 00060018
60008001 00001800 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 0000FC3F FC3F0000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00060018 60008001 0C001800 60001800
00068001 00000018 00000000 00000000 00000000 00000000 00000000 C0070000
10082008 10001000 20001000 0001C000 00000001 80010000 00008001 00000000
00000000 00000000 C0030000 1008200C 10101010 90107010 10111011 10111011
78109010 00100010 300C0008 0000E003 00000000 00000000 00000000 C00F0000
20024001 20022002 10041004 F80F1004 08080808 04100410 00001E3C 00000000
00000000 00000000 00000000 F03F0000 04080808 04080408 F00F0808 04080808
04080408 08080408 0000F03F 00000000 00000000 00000000 00000000 E4010000
0C0C1406 00100408 00100010 00100010 04080010 18060C0C 0000E001 00000000
00000000 00000000 00000000 E03F0000 08101810 04100410 04100410 04100410
04100410 18100810 0000E03F 00000000 00000000 00000000 00000000 F83F0000
08080808 80080808 800F8008 80088008 04080408 04080408 0000FC3F 00000000
00000000 00000000 00000000 FC1F0000 04040404 40040404 C0074004 40044004
00040004 00040004 0000C01F 00000000 00000000 00000000 00000000 C8030000
1818280C 00200810 00200020 FC200020 08100820 100C0818 0000E003 00000000
00000000 00000000 00000000 3E3E0000 08080808 08080808 F80F0808 08080808
08080808 08080808 00003E3E 00000000 00000000 00000000 00000000 F80F0000
80008000 80008000 80008000 80008000 80008000 80008000 0000F80F 00000000
00000000 00000000 00000000 FE030000 10001000 10001000 10001000 10101000
10101010 60082010 00008007 00000000 00000000 00000000 00000000 3C3E0000
20081008 80084008 000B0009 4008800C 10082008 08081008 00001E3E 00000000
00000000 00000000 00000000 803F0000 00040004 00040004 00040004 00040004
04040404 04040404 0000FC3F 00000000 00000000 00000000 00000000 0E380000
0C180C18 14141414 24122412 C4114411 04100410 04100410 00001E3C 00000000
00000000 00000000 00000000 7E780000 08140818 08120812 08110811 88108810
48104810 18102810 0000187E 00000000 00000000 00000000 00000000 E0030000
0C18180C 02200410 02200220 02200220 04100220 180C0C18 0000E003 00000000
00000000 00000000 00000000 F01F0000 04040804 04040404 08040404 0004F007
00040004 00040004 0000C01F 00000000 00000000 00000000 00000000 E0030000
0C18180C 02200410 02200220 02200220 04100220 180C0C18 8C01E003 0000F006
00000000 00000000 00000000 E03F0000 08081008 08080808 10080808 4008E00F
10082008 08081008 00000E3E 00000000 00000000 00000000 00000000 C8030000
1810280C 00100810 C003000C 08003000 08100800 10140818 0000E013 00000000
00000000 00000000 00000000 FC1F0000 84108410 84108410 80008000 80008000
80008000 80008000 0000F007 00000000 00000000 00000000 00000000 7C3E0000
08100810 08100810 08100810 08100810 08100810 10080810 0000E007 00000000
00000000 00000000 00000000 3E3E0000 04100410 08080808 10041004 20021004
20022002 C0014001 00008000 00000000 00000000 00000000 00000000 3E3E0000
04100410 84108410 44114411 280A4809 280A280A 180C180C 0000180C 00000000
00000000 00000000 00000000 3E3E0000 10040808 20021004 80004001 20024001
10042002 08080808 00003E3E 00000000 00000000 00000000 00000000 1E3C0000
10040808 20021004 40012002 80008000 80008000 80008000 0000F007 00000000
00000000 00000000 00000000 F81F0000 10100810 40102010 80004000 00020001
08040802 08100808 0000F81F 00000000 00000000 00000000 E0000000 80008000
80008000 80008000 80008000 80008000 80008000 80008000 80008000 E0008000
00000000 00000000 00080000 00040008 00020004 00010002 80000001 40008000
20004000 10002000 08001000 00000800 00000000 00000000 80030000 80008000
80008000 80008000 80008000 80008000 80008000 80008000 80008000 80038000
00000000 00000000 80000000 2002C001 08081004 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
FF7F0000 00000000 80030000 C0018003 6000C000 00002000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 2008C007 10001000 3008D007 10101010 30081010 0000DC07 00000000
00000000 00000000 00000000 00080038 00080008 0C0AF009 0208040C 02080208
02080208 0C0A040C 0000F039 00000000 00000000 00000000 00000000 00000000
00000000 180CE803 08100808 00100010 00100010 180C0C08 0000E003 00000000
00000000 00000000 00000000 08003800 08000800 2818C807 08201810 08200820
08200820 28181810 0000CE07 00000000 00000000 00000000 00000000 00000000
00000000 180CE003 04100808 FC1F0410 00100010 0C0C0008 0000F003 00000000
00000000 00000000 00000000 8401F800 00010001 0001F80F 00010001 00010001
00010001 00010001 0000F80F 00000000 00000000 00000000 00000000 00000000
00000000 2818CE07 08201810 08200820 08200820 28181810 0800C807 10000800
C00F3000 00000000 00000000 00080038 00080008 100AE009 0808080C 08080808
08080808 08080808 00003E3E 00000000 00000000 00000000 80000000 80008000
00000000 80008007 80008000 80008000 80008000 80008000 0000F80F 00000000
00000000 00000000 20000000 20002000 00000000 1000F00F 10001000 10001000
10001000 10001000 10001000 20001000 800F6000 00000000 00000000 0004001C
00040004 20047804 80044004 00070005 40048004 10042004 00003C1C 00000000
00000000 00000000 00000000 8000800F 80008000 80008000 80008000 80008000
80008000 80008000 0000FC1F 00000000 00000000 00000000 00000000 00000000
00000000 C4183877 84108410 84108410 84108410 84108410 0000C67C 00000000
00000000 00000000 00000000 00000000 00000000 100AE039 0808080C 08080808
08080808 08080808 00003E3E 00000000 00000000 00000000 00000000 00000000
00000000 180CE003 04100808 04100410 04100410 180C0808 0000E003 00000000
00000000 00000000 00000000 00000000 00000000 0C0AF039 0208040C 02080208
02080208 0C0A040C 0008F009 00080008 003F0008 00000000 00000000 00000000
00000000 2818CE07 08201810 08200820 08200820 28181810 0800C807 08000800
7E000800 00000000 00000000 00000000 00000000 C402380E 00020003 00020002
00020002 00020002 0000F01F 00000000 00000000 00000000 00000000 00000000
00000000 1804E803 00040804 70008003 08000800 100C0808 0000E00B 00000000
00000000 00000000 00000000 00040004 00040004 0004F01F 00040004 00040004
00040004 18020004 0000E001 00000000 00000000 00000000 00000000 00000000
00000000 08083838 08080808 08080808 08080808 28041808 0000CC03 00000000
00000000 00000000 00000000 00000000 00000000 08083E3E 10040808 10041004
20022002 C0014001 00008000 00000000 00000000 00000000 00000000 00000000
00000000 04101E3C 84100410 48098808 48094809 30065005 00003006 00000000
00000000 00000000 00000000 00000000 00000000 08083C1E 20021004 80004001
20024001 08081004 00003C1E 00000000 00000000 00000000 00000000 00000000
00000000 08103C3C 10080810 20081008 40042004 80024002 00018001 00020001
803F0002 00000000 00000000 00000000 00000000 0808F80F 20001008 80004000
00020001 08080804 0000F80F 00000000 00000000 00000000 60000000 80008000
80008000 80008000 80008000 80000003 80008000 80008000 80008000 60008000
00000000 00000000 00000000 80000000 80008000 80008000 80008000 80008000
80008000 80008000 80008000 80008000 00000000 00000000 00030000 80008000
80008000 80008000 80008000 80006000 80008000 80008000 80008000 00038000
00000000 00000000 00000000 00000000 00000000 00000000 98190C0F 0000F030
00000000 00000000 00000000 00000000 00000000
End DefineFont[/code]
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 12:36am 06 May 2017
Copy link to clipboard 
Print this post

Rather than pasting the font into MMedit, try just opening the Superclockfont.bas with MMedit & then send that to the MM.

Then Library Save, then Load the main program in MMedit & send it.

Get rid of the OPTION AUTORUN ON TO START WITH,
Change it to OPTION AUTORUN OFF.

Phil.
 
heppy36

Regular Member

Joined: 29/07/2011
Location: Australia
Posts: 54
Posted: 12:33pm 06 May 2017
Copy link to clipboard 
Print this post

Thanks ,turns out the file I was send was corupt,I re download all good

Cheers


Heppy
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024