Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:26 27 Nov 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 : Newest update to Beginning Maximite

Author Message
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 06:17am 12 Mar 2013
Copy link to clipboard 
Print this post


The documentation has been updated (version 1.4). "Beginning Maximite" is now "Beginning Maximite Programming and Interfacing" and is up to 550 pages (I've even reduced the font and paragraph spacing to reduce number of pages).

http://www.circuitgizmos.com/files/begmax.pdf

I've filled in some code examples, added some examples of graphic output, reorganized, and all in all this is the one-stop document for the CGCOLORMAX and CGMMSTICK.

The most recent addition is the FAQ section. I hope to keep adding more to that.



This is the table of contents:


Contents 4
Preface 11
Quick CGMMSTICK Hardware Interface Example 17
Maximite / CGMMSTICK / CGCOLORMAX Introduction 26
CGMMSTICK / CGCOLORMAX Setup and MMIDE 35
CGMMSTICK Setup 36
CGCOLORMAX Setup 43
MMIDE Setup 47
Maximite BASIC Features 59
Project #1
CGMMSTICK LED Control Example 61
Project #2
CGCOLORMAX Relay Shield Example 68
Project #3
CGMMSTICK Sound Example 74
Note/Frequency Table for SOUND command 78
Project #4
CGMMSTICK Input Example and Analog Input Example 81
Project #5
CGMMSTICK LCD Interface Example 85
Project #6
CGMMSTICK Vacuum Fluorescent Display Example 87
Project #7
CGCOLORMAX1 Serial I/O Example 92
Serial Communications 98
The Serial OPEN Command 99
Serial Input/Output Pin Allocation 101
Reading and Writing the Serial Port 102
Opening a Serial Port as the Console 103
Project #8
CGMMSTICK SPI Interface Example 104
Serial Peripheral Interface (SPI) 108
Project #9
CGMMSTICK I2C Interface Example 111
Inter Integrated Circuit (I2C) bus 115
Project #10
CGMMSTICK 1-Wire Interface Example 117
1-Wire Interface 122
Project #11
CGCOLORMAX LCD Shield Example 124
Project #12
CGKEYCHIP1 Custom Keypad Example 137
CGMMSTICK1 Technical Information 144
SD card insertion (CGMMSTICK1) 146
SD card removal (CGMMSTICK1) 149
J1 Pinout (CGMMSTICK1) 151
CGVGAKBD1 Schematic 152
Schematic (CGMMSTICK1) 155
Firmware Update (CGMMSTICK1) 156
Firmware Upgrade Steps (CGMMSTICK1) 157
CGCOLORMAX1 Technical Information 162
Power Supply (CGCOLORMAX1) 163
Rear Connector (CGCOLORMAX1) 165
Shield Connections (CGCOLORMAX1) 168
Interface Circuits (CGCOLORMAX1) 170
Misc Connections (CGCOLORMAX1) 172
Pin Outs and Function (CGCOLORMAX1) 173
Firmware Update (CGCOLORMAX1) 174
Firmware Upgrade Steps 175
CGCOLORMAX2 Technical Information 180
Power Supply (CGCOLORMAX2) 181
Rear Connectors (CGCOLORMAX2) 184
Shield Connections (CGCOLORMAX2) 188
Interface Circuits (CGCOLORMAX2) 190
Misc Connections (CGCOLORMAX2) 194
Pin Outs and Function (CGCOLORMAX2) 197
Firmware Update (CGCOLORMAX2) 198
Firmware Upgrade Steps 199
CGMMSTICK and CGCOLORMAX I/O Characteristics 204
CGCOLORMAX Composite Output 205
Joystick Connections 206
Example Shields 208
MMBasic Reference 210
Language Constructs 211
Editing, Programming, and Debugging 213
Screen, Graphics, and Keyboard 214
Math Functions 216
Character and String Functions 217
File System 218
Input and Output 219
Language Implementation Characteristics 221
MMBasic language constructs 222
Defined Subroutines and Functions 223
Subroutine Arguments 224
Local Variables 225
Defined Functions 227
Passing Arguments by Reference 229
Naming Conventions 232
Timing 233
Interrupts 234
CLEAR 235
CONTINUE 236
DATA 237
DIM 238
DO LOOP 239
DO LOOP UNTIL 240
DO WHILE LOOP 241
ELSE 242
ELSEIF THEN 244
END 246
END FUNCTION 247
END SUB 248
ENDIF 249
ERASE 251
EXIT 252
EXIT FOR 253
EXIT FUNCTION 254
EXIT SUB 255
FOR TO STEP 256
FUNCTION 257
GOSUB 259
GOTO 260
IF THEN ELSE 261
IF THEN GOTO 263
IF THEN ELSE ELSEIF ENDIF 265
IRETURN 266
LET 267
LOCAL 268
LOOP UNTIL 269
NEXT 270
ON nbr GOTO|GOSUB 272
OPTION BASE 273
OPTION Fnn 274
OPTION PROMPT 275
OPTION USB 276
PAUSE 277
RANDOMIZE 278
READ 279
REM or ' 280
RESTORE 281
RETURN 282
SETTICK 283
SUB 284
TIMER (command/function) 285
WHILE WEND 286
MMBasic editing, programming, and debugging 287
Full Screen Editor 289
AUTO 291
CHAIN 292
CONFIG CASE 293
CONFIG KEYBOARD 294
CONFIG TAB 295
COPYRIGHT 296
DATE$ (command/function) 297
DELETE 298
EDIT 299
ERROR 301
LIST 302
LOAD 303
MEMORY 304
MERGE 305
MM.CMDLINE$ 306
MM.DEVICE$ 307
MM.FNAME$ 308
MM.VER 309
NEW 310
OPTION BREAK 311
RENUMBER 312
RUN 313
SAVE 315
TIME$ (command/function) 316
TROFF 317
TRON 318
MMBasic Screen, Graphics, and Keyboard 319
Graphics 320
Working with Color 328
Color Modes 330
Scan Line Color Override 332
Game Playing Features 333
Loadable Fonts 337
Sprite Definition Files 339
Special Keyboard Keys 341
BLIT 343
CIRCLE 347
CLR$ 352
CLS 354
COLLISION 355
COLOR 356
CONFIG COMPOSITE 359
CONFIG VIDEO 361
FONT 362
FONT LOAD/UNLOAD 365
INKEY$ 369
INPUT (from keyboard) 370
KEYDOWN (keyboard) 371
LINE 372
LINE INPUT (from keyboard) 379
LOADBMP 380
LOCATE 381
MM.HPOS 384
MM.HRES 385
MM.VPOS 387
MM.VRES 389
MODE 391
OPTION VIDEO 395
PIXEL (command/function) 396
POS 402
PRESET 403
PRINT 405
PRINT @ 406
PSET 409
SAVEBMP 411
SCANLINE 412
SPRITE 414
TAB 417
MMBasic math functions 419
ABS 420
ATN 421
CINT 422
COS 423
DEG 424
EXP 425
FIX 426
INT 427
LOG 428
PI 429
RAD 430
RND 431
SGN 432
SIN 433
SQR 434
TAN 435
MMBasic character and string functions 436
ASC 437
BIN$ 438
CHR$ 439
FORMAT$ 440
HEX$ 442
INSTR 443
LCASE$ 444
LEFT$ 445
LEN 446
MID$ 447
OCT$ 448
RIGHT$ 449
SPACE$ 450
SPC 451
STR$ 452
STRING$ 453
UCASE$ 454
VAL 455
MMBasic File System 456
Storage Commands and Functions 457
CHDIR 458
CLOSE (file) 459
COPY 460
CWD$ 461
DIR$ 462
DRIVE 463
EOF 464
FILES 465
INPUT # 466
INPUT$ (from file) 467
KILL 468
LINE INPUT (file) 469
MKDIR 470
MM.DRIVE$ 471
MM.ERRNO 472
NAME 473
OPEN (file) 474
OPTION ERROR 476
PRINT 477
RMDIR 478
WRITE 479
XMODEM 480
MMBasic input and output 481
Communications 482
Interrupts 483
CAN (Controller Area Network) 484
Audio and PWM Output 494
BYTE2NUM 496
CAN 497
CLOSE (serial) 500
CLOSE CONSOLE (serial) 501
I2CDIS 502
I2CEN 503
I2CRCV 504
I2CSEND 506
I2CSDIS 507
I2CSEN 508
I2CSRCV 509
I2CSSEND 510
INPUT$ (from serial) 511
LOC 512
LOF 513
MM.I2C 514
MM.OW 515
NUM2BYTE 516
OPEN (serial) 517
OPEN AS CONSOLE (serial) 518
OWCRC8 519
OWCRC16 520
OWREAD 521
OWRESET 523
OWSEARCH 524
OWWRITE 525
PEEK 526
PIN (command/function) 527
PLAYMOD 528
PLAYMOD STOP 529
POKE 530
PORT (command/function) 531
PULSE 532
PWM 533
PWM STOP 534
SETPIN 535
SOUND 536
SPI 537
TONE 538
TONE STOP 539
FAQ – Frequently Asked Questions 540
ASCII Tables 542
Index 546

Micromites and Maximites! - Beginning Maximite
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 01:34am 13 Mar 2013
Copy link to clipboard 
Print this post

Holey moley CG - that's getting to be a major tome! I think you're going to have to go to a smaller font I like all the different projects you've written up in there; they really showcase the sorts of things that can be done.

I don't remember seeing a link to the library anywhere in it - that would be a big help for any MM 'beginners'- but I could easily have missed it! I can't see there'd be any problem at all giving a link to it from Hugh or Geoff's point of view (best to check though) but I'm not sure if you'd necessarily want it.
Greg
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 05:39am 13 Mar 2013
Copy link to clipboard 
Print this post

I don't point directly to the on-line library in the document, but I do point to Geoff's site where the library can be downloaded.

550 pages is a lot to print out. If I make the font smaller, I can reduce the number of pages to about 500. I keep adding to the document, though, so it will still grow.




Micromites and Maximites! - Beginning Maximite
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 06:32am 13 Mar 2013
Copy link to clipboard 
Print this post

I think splitting it in 2 pieces might be worth while.
The first part is a very thorough description about the hardware and its uses.
From page 220 it is a MMBasic reference that would be a good Part 2.

If i would have a printed version i would prefer a split like that as i can use them independently.
A smaller PDF is also faster in opening and searching.







Microblocks. Build with logic.
 
James_From_Canb

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 265
Posted: 11:13am 13 Mar 2013
Copy link to clipboard 
Print this post

I agree. I prefer a hard copy of the first part for the description and projects, and a searchable pdf for the language reference. I know I could print the first half, but I would still have to search the whole document to find something in the language section.

But it's not a make-or-break issue.

A great effort. Thanks.

James
My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention.

Hedley Lamarr, Blazing Saddles (1974)
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 11:29am 13 Mar 2013
Copy link to clipboard 
Print this post

Loading the doc takes three seconds, searching for "playmode file" which is at the end of the doc from the very beginning is under a second. It is pretty fast for me. I use foxit for a pdf viewer.

There are some format changes I'd like to make that would reduce the number of printed pages, but I don't want to get hung up on format.
Micromites and Maximites! - Beginning Maximite
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 08:39pm 13 Mar 2013
Copy link to clipboard 
Print this post

You are forgetting people who don't have a quick computer or are unable to download and open the pdf in foxit.
Think iPad, chromebook, slower laptops etc.
The pdf file takes about 50 seconds to download on a 1Mb adsl line and about 20 seconds to render.
Then not all pdf readers are created equal and searching a document for a specific word can take as long as 20 seconds. Some even do a search after each letter typed in , pretty dumb but readers like that exist. (Chrome browser for example, one of the most used browsers i might add).
Having two pages of that document open at the same time is what is done a lot in practice. I know because i see people doing it all the time. iPads or Android tablets are particular popular for having documentation while your busy on a project. In a few hackerspaces i have been and go to i see it all the time. Ignoring those uses would be a pity.
Downloading the whole pdf again to use it in another window or tab wastes a lot of memory (i know not noticable on a 8GB or more 'super' computer) and slows it down even more even when it is already in cache.



Edited by TZAdvantage 2013-03-15
Microblocks. Build with logic.
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 09:59pm 13 Mar 2013
Copy link to clipboard 
Print this post

Just loaded it again on my system and it took 33 secs with Adobe Reader. That's only for the first time in a session though; after that it's quick from cache. My notebook is a seven year old 1.6 GHz NEC running XP SP2. I've got other Win 7 notebooks but use this mostly because all my old "good" stuff is on it - guess I'm lazy! Searching is very fast - no problems.

It's not a big deal for me though because I seldom access it. I've usually got Geoff's MMBasic Manual running in the taskbar when I'm coding.
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 10:14pm 13 Mar 2013
Copy link to clipboard 
Print this post

Hi Rob, All,

  CircuitGizmos said   Loading the doc takes three seconds, searching for "playmode file" which is at the end of the doc from the very beginning is under a second.


I thought I would try it...

Adobe Reader 9... about 1- 1.5sec to load and about 2- 3 sec to search for playMOD file typo on your example Rob.

This is on about a 3or4year old AMD system win7 64 bit that was CPU upgraded to 6 core phenom AM3. I do have a 120G SSD though

Regards,

Mick

Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Bill.b

Senior Member

Joined: 25/06/2011
Location: Australia
Posts: 226
Posted: 11:33pm 13 Mar 2013
Copy link to clipboard 
Print this post

HI Rob

well I have an eight year old pc , first of the dual core 2.1g processors
and the file loaded within 1.5 seconds and serching for the PlayMOD File
was on the screen just as soon as i hit the second click of the mouse.

I have no complaints about the size of the document.

Bill
In the interests of the environment, this post has been constructed entirely from recycled electrons.
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 11:56pm 13 Mar 2013
Copy link to clipboard 
Print this post

Like Bill, the file loaded in about 1 to 2 seconds and the search was so quick that I couldn't time it. I am using PDF-XChange Viewer on Win 8 32 bit with standard disks and an over-clocked quad core i5 processor. It's even faster after caching from the first time.

Bob
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 01:16am 14 Mar 2013
Copy link to clipboard 
Print this post

  paceman said   Just loaded it again on my system and it took 33 secs with Adobe Reader. That's only for the first time in a session though; after that it's quick. My notebook is a seven year old 1.6 GHz NEC running XP SP2.

I suspect that most of the time taken for the first load is due to the AVAST anti-virus check. It rotates the little ball during the loading anyway.

When I'm at the notebook and doing things it loads slowly the first time, after that it's quick, presumably loading from cache and without the AVAST check. If I've been away from the notebook for a while, maybe two hours or so and load it, then the first time it's slow again, presumably getting another check-up? Seems a bit strange that it doesn't flag it as 'previously checked'.

Greg
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 03:59am 14 Mar 2013
Copy link to clipboard 
Print this post

On PC's a big doc is not a problem.

I just tested it on an iPad2 (1Mb adsl wifi) with the standard browser.
Opening (downloading) takes 45 sec.
Searching for ABS( takes 20 seconds and gets 5 hits.
There is not an easy way to save this document for later, so the next use i need to download it again.
Scrolling through the document stalls every 5-6 pages for rendering, up or down does not matter. This prevents fast scrolling, so you will be forced to use the search.

Once it is loaded, the searching and scrolling stays too slow for use.
If i use the MMBasic manual from geoff, that one downloads in 3 seconds. And a search for ABS( take 3 seconds.Obviously it has less info.

All this with a freshly started iPad2 with full battary and excelent wifi connection and no other programs running in the background.

I am trying to point out that if you use an iPad or Android the usefullness of a pdf is directly related to its size and complexity and number of images.
The current trend is that more and more PC's are being replaced with tablets. I see it with people from teenager to around 25-30. They almost exclusively use a mobile device.

On my Asus eee laptop it is just fast enough to not disturb the flow of work.

Again on my PC i have no problem whatsoever with the size and speed, but why not choose a solution that will make all those users of iPads and other tablets happy.
An online HTML version would be another option, with an index it will probably be the easiest to work with.Edited by TZAdvantage 2013-03-15
Microblocks. Build with logic.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 04:15am 14 Mar 2013
Copy link to clipboard 
Print this post

(Good on you, Mick. I didn't catch the typo when I typed it here.)

You can see that it would be hard for me to ever perceive that there would be any type of load/search issue if the issue doesn't affect me. Based on the feedback here it is only an issue in minor cases. I will still see what I can do to make the total document size smaller, however.
Micromites and Maximites! - Beginning Maximite
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 05:51am 14 Mar 2013
Copy link to clipboard 
Print this post

I have installed iBooks. Made sure the PDF is stored on the iPad itself.
Opening is quick, about 2-3 seconds.
Searching however is still extremely slow. About 25 seconds for ABS(
Scrolling through pages goes quick.
Bookmarking important pages will allow quick jumps, minimizing the need for searches.
I have page 6 as a bookmark which allows me to use the index to jump to the right place.
In short. iBook makes it workable.

A good reader is the most important. Someone knows a good one on an Android tablet?

Microblocks. Build with logic.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 07:05am 14 Mar 2013
Copy link to clipboard 
Print this post

There are free tools to split PDFs. Does it split OK with any of them?

Would a PDf-to-html converter make it better for tablets?

John
 
Print this page


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

© JAQ Software 2024