Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 03:37 29 Mar 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 : ELLO 1A - first "official" release

     Page 1 of 2    
Author Message
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 71
Posted: 11:49am 16 Mar 2021
Copy link to clipboard 
Print this post

Just updated the website and the files in it with the first non-beta release: http://ello.cc

For those who did not see my previous post - this is a small (the simplest possible) computer with graphics, based on PIC32MX170 or PIC32MX270.

Its unique feature is that it runs a C interpreter.

The main purpose of the system is for learning - learn to build, then learn to program. Hence the maximum simplicity in the hardware. It may be fit for small hobby projects as well.

The change log is on the website. I have not included "bugs fixed" anywhere in the log because that is assumed by default for all releases.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 12:04pm 16 Mar 2021
Copy link to clipboard 
Print this post

Thanks for the update. I received the PCB you sent me yesterday--now awaiting hardware--hope I ordered all the necessary stuff.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3422
Posted: 01:54pm 16 Mar 2021
Copy link to clipboard 
Print this post

Hi knivd,

Nice project. I am impressed you achieved this with only 25 components.
But looking at the schematics I found through your link I am not sure if your hardware can deliver what the schematics promise.

The LED (+ 330ohm resistor) load on the SCKL signal may work OK, but the I2C bus (SCL signal loaded with 10uF and the buzzer) will definitely have reliability problems.





Typically 47pF (400kHz) or 200pF (100kHz) are the maximum allowable bus loads.
It may be a good idea to put a jumper there, in case you use I2C, you loose the buzzer.
Edited 2021-03-16 23:55 by Volhout
PicomiteVGA PETSCII ROBOTS
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 71
Posted: 02:10pm 16 Mar 2021
Copy link to clipboard 
Print this post

  Volhout said  .....



The I2C bus has never been a priority. I think it will be pretty much either one or the other.
I ran a very small test on the I2C just generating clock (which is the line in question) and it went on fine at the typical I2C frequency which is way above the one of the speaker. The speaker also works just fine at its own frequencies (extensively tested).
But again, the I2C is a secondary feature which may need some further adjustments in time. I think the suggestion about a jumper is quite good.


PS.
One thing that I forgot to mention initially, the console functionality is now available, so if you want to test the experience with C.impl, the MCU and two capacitors are all that will be needed, even on a breadboard.


...
Edited 2021-03-17 06:07 by knivd
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 369
Posted: 02:08am 18 Mar 2021
Copy link to clipboard 
Print this post

lots of datatypes .. and an extra 80-bit floating point !! Nice.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 02:56pm 19 Mar 2021
Copy link to clipboard 
Print this post

When I ordered parts, I neglected to order the SD card module. I have a number of these micro SD modules:



Would that be relatively easy to fit instead, perhaps using the J3 connector, which has MISO, MOSI, and CLK?
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3422
Posted: 03:12pm 19 Mar 2021
Copy link to clipboard 
Print this post

Lizby..????

Wrong thread ??



PicomiteVGA PETSCII ROBOTS
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 03:54pm 19 Mar 2021
Copy link to clipboard 
Print this post

It's the right thread. I neglected to order the SD module, labeled 0D20SI on your photo. I'm wondering if I can expand the 2x5 header socket next to it (adding CS) to use the micro SD module I posted the photo of (which I've successfully used in several other circumstances).
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 71
Posted: 05:28pm 19 Mar 2021
Copy link to clipboard 
Print this post

You can connect an SD card to the expansion pins on J3 and use RA0 instead of RA1 (which is the default in the schematic). Then you should be able to use the SD card as SD2: device. The software won't switch to it automatically if there is a card in the slot, as it does with SD1, but at least you would be able to operate an SD card.
I don't have a module like yours with me here to test right now; if there are issues please let me know. Thanks
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 06:26pm 19 Mar 2021
Copy link to clipboard 
Print this post

  knivd said  You can connect an SD card to the expansion pins on J3 and use RA0 instead of RA1 (which is the default in the schematic).

Thanks. If I get far enough to use the SD card, I'll try that.

I soldered the other components on this morning, flashed the hex to a MX170 using Bigmik's Mup V3 with pic32prog.exe, cobbled together a connection from the purple DIN connector to a usb/serial module, plugged in power, flipped the switch, got a "password:" prompt, hit <Enter>, and I'm in:

ELLO 1A
[con]           R101 (C) Mar 2021, KnivD

Use .? for information

 1: .?
>>> HINT: Use command .H for help

Free memory: 52 Kbytes
Current path: IFS:/

.... File name: ``
.. Find string: ``
Replace string: ``
2 lines, 3 bytes

.H

>>> <Ctrl-Z> History          <Ctrl-N> Next line or add new
>>> <Ctrl-L> Clear full line  <Ctrl-Y> Clear to end of line
>>> <Ctrl-V> Clear screen
>>> '.' at start of a line marks a command line
>>> '@' represents the current line N     '#' source line N
>>> '!' is the number of lines incl current and to the end
.N pw, ph  Page width (12-999 chars) and height (2+ lines)
.T width   TAB width (1-80)
.~         Equivalent to <Del>        .\  New line <Enter>
.* count   Repeat the following cmd for spec'd number times
.`text`    Insert txt at the cursor pos in the current line
.X [hpos]  Place cursor at spec pos within the current line
.[J] [< or >] [number]  Jump to line/prev/next; '.J' last N
.L [

count] List next N lines or until EOF [option Pause]
.P [

count] List previous N lines or from start   [Pause]
.I [count] Insert blank lines. One line if [cnt] is missing
.D [count] Delete lines. Only the current with no parameter

Press <Space> to continue...
.S [line]  Set source line for copy and move ops     .H  .?
.C [count] Copy lines from source to current. Default num=1
.M [count] Move lines from source to current. Default num=1
.F [`text`]  Set text for find; w/o param, do find <Ctrl-F>
.R [`text`]  Set text for replace; w/o, find&repl  <Ctrl-R>
.E file    Execute command script from file
.= [file]  Run source in memory or from file
.O file    Open text file   .W file  Write  .A file  Append
./init drv:   Initialise drive  ./lock pwd   Lock access
./dir [path][mask]  List files. Can do wildcards '?'and '*'
./chdir [drv:][path]  Change drive and/or dir; Show current
./mkdir path  Make new dir      ./rmdir path  Remove empty
./del mask    Delete files      ./ren  mask_old , mask_new
./copy mask, mask   Copy files. Supports wildcards '*', '?'
./list file   List text file    ./blist file  List bin file
./lsl  <lib>  List consts and funcs in C.impl sys library
./reset       System reset


So, cool. Now I have to figure out what to do next.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 71
Posted: 07:51pm 19 Mar 2021
Copy link to clipboard 
Print this post

That's great. Thanks for the update.
One thing I forgot to mention earlier - when you use RA0 for SD2, you will need to add an external pullup resistor to the port.

You switch to SD2: with command ./cd sd2: (or ./chdir sd2:)
Edited 2021-03-20 05:54 by knivd
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 71
Posted: 09:54am 26 Mar 2021
Copy link to clipboard 
Print this post

R102
Now a USB console is also available
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 812
Posted: 06:47pm 31 Mar 2021
Copy link to clipboard 
Print this post

Hi,
just finished assembling the board and it works very nicely. How can I change the keyboard layout permanently?
Are there any demo programs for this?
Thank you for the beautiful project!

:)Frank
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 71
Posted: 07:09pm 31 Mar 2021
Copy link to clipboard 
Print this post

  Frank N. Furter said  Hi,
just finished assembling the board and it works very nicely. How can I change the keyboard layout permanently?
Are there any demo programs for this?
Thank you for the beautiful project!

:)Frank



Changing the keyboard layout permanently I will include in the R103 version. For now you can change it by creating a small autorun file:

#pragma LAYOUT ...layout code...


The autorun file gets executed every time the system starts.

Regarding demos, here is a simple one:




#include <platform.h>
#include <graphics.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>

clearScreen(0);
int x1,x2,x3,y1,y2,y3,c,dt;
srand(clock());
lockScroll();
while(1) {
 x1 = rand() % Hres();
 y1 = rand() % Vres();
 x2 = rand() % Hres();
 y2 = rand() % Vres();
 x3 = rand() % Hres();
 y3 = rand() % Vres();
 c = -1 - (rand() % 20);
 dt = rand() % 5;
 switch(dt) {
   case 0: drawTriangle(x1,y1,x2,y2,x3,y3,c); break;
   case 1: drawEllipse(x1,y1,x2/7,y2/7,sin(x3),c); break;
   case 2: drawRect(x1,y1,x2,y2,c); break;
   case 3: drawCircle(x1,y1,x2/2,c); break;
   case 4: fontScale(1 + x3 % 3); posX(x1); posY(y1 % (Vres()-40));
           fontFcol(c); fontBcol(COL_TRANSP); printf("Hello"); break;
 }
}





And another:



#include <platform.h>
#include <graphics.h>

clearScreen(0);
int rx, ry, c;
fontFcol(COL_SOLID);
fontBcol(COL_NONE);
fontScale(1);
for(rx = 0; rx < 8; rx++)
 for(ry = 0; ry < 8; ry++) {
   c = ((rx & 1) ^ (ry & 1)) * COL_GREY50;
   drawRect(16 + rx * 38, ry * 38, 16 + 38 + rx * 38, 38 + ry * 38, c);
   posX(16 + 16 + rx * 38); posY(4 + 8 * 38); drawChar('A' + rx);
   posX(2); posY(12 + ry * 38); drawChar('8' - ry);
 }
drawFrame(16, 0, 16 + 8 * 38, 8 * 38, COL_SOLID);

double a = 0;
int x = 50, y = 50;
rx = 1, ry = 1;
while(1) {
 drawShape( x, y, a,
     "C-1 M10,20 M20,10 M-20,10 M-10,20 M-10,-20 M-20,-10 M20,-10 M10,-20 N M,15 D M,30 N M-15,-15 D M30,"
 );
 delay_ms(33);
 drawShape( x, y, a,
     "C-1 M10,20 M20,10 M-20,10 M-10,20 M-10,-20 M-20,-10 M20,-10 M10,-20 N M,15 D M,30 N M-15,-15 D M30,"
 );
 a = a + 0.05;
 x += rx; y += ry;
 if(x > Hres() || x < 0) rx = -rx;
 if(y > Vres() || y < 0) ry = -ry;
}





The grain benchmark translated in C:



#include <stdlib.h>
#include <stdio.h>
#include <platform.h>
#include <time.h>
#include <string.h>
#include <math.h>

void main(void) {
 printf("C.impl benchmark (C) KnivD 2016, 2019, 2020\r\n");
 int t, i = 0;
 double x[1001], f = 0.0;
 char s1[5], s[50];
 printf("Calculating... ");
 int TIMER = clock();
 while((clock() - TIMER) < 30000) {
   i += 2; f += 2.0002;
   if((i % 2) == 0) {
     i *= 2; i /= 2;
     f *= 2.0002; f /= 2.0002;
   }
   i--;
   t = 100; while(t--) {
     f -= 1.0001;
     if((f - floor(f)) >= 0.5) {
       f = sin(f * log10(i));
       sprintf(s, "%6.6f", f);
     }
     f = (f - tan(i)) * ((rand() / RAND_MAX) / i);
     sprintf(s, "%d", i);
     strncpy(s1, s, 2);
     s1[2] = 0;
     if(strstr(s1, s)) strcat(s, "0");
   }
   x[1 + (i%1000)] = f;
 }
 printf("\rPerformance: %d grains\r\n", (i * 1024) / 286);
}




My main focus is on the system as there are many more things to fix and improve in it. If more people come to like it, I hope there will be more software too...
Edited 2021-04-01 05:16 by knivd
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 812
Posted: 07:44pm 31 Mar 2021
Copy link to clipboard 
Print this post

Thanks for your fast response!
Your demos work very nicely! I will have to get used to the editor first...

:)Frank
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 812
Posted: 11:58am 01 Apr 2021
Copy link to clipboard 
Print this post

@Kon
...another stupid question:
How can I save a written program to SD? I can't find anything in your manual about it...

:)Frank
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 812
Posted: 12:36pm 01 Apr 2021
Copy link to clipboard 
Print this post

...ok, I found it. .w does it... (quite nicely hidden ;-)

:)Frank
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 812
Posted: 12:33pm 02 Apr 2021
Copy link to clipboard 
Print this post

A few comments and questions:

- The THT oscillator (MXO45HS-3C-20M000000) is operated outside the spec:
 MIN Supply Voltage Vcc 4.5 V

 In the SMD BOM there is the wrong link to the SMD oscillator
 (the same as under THT). I used a "MCSJK-6NC2-20.00-25-B" - it works very well!

 I populated the board mostly with SMD and it all worked beautifully right off
 the bat!

- The VGA/PS2 combo jack was very hard to push into the board -
 some pins always wanted to go somewhere else...

- Is there any way to clear the current program from memory to type in a new one?
 (RESET also terminates the terminal connection...)

- You wrote in manual: "The user is able to set their own password at a later stage
                      later from within RIDE, if one is needed."
 ...but there is nothing about it...

- Can you provide a link for more information on using C libraries?

- Do you have more sample programs?

Thank you so much for this great project!!!

:)Frank
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 71
Posted: 01:27pm 02 Apr 2021
Copy link to clipboard 
Print this post

Ah, thanks for the spotted issues!
Interestingly, I have assembled quite a few boards with this oscillator and none of them has even shown any problem. The original oscillator with which I started was 24 MHz and was a 3.3V one, and when I changed it to 20, I have overlooked the supply range. The actual part number should be MXO45HSLV-3C-20M000000
I see that one is not in stock in Digikey though, so I put another link in the BOM. Also fixed the SMT link.
Will correct the text on the board in the next revision as well.

Regarding the VGA connector, yes it is a bit difficult to get it to fit all the pins at once. Not much I can do about that, except probably to make the holes a bit wider in the next PCB revision.

You can clear the program with a RIDE command .1d!
I admit there is a lot more to be written in the documentation and will gradually fill the gaps in it, especially regarding the RIDE commands and functionality.
The most important commands there are .o .w .p (also .pp in case you want pause), .l (and .lp). The reason for the way it is, is because it is not linked specifically to any type of hardware, display, or to the C interpreter, but is also a normal text editor of line type. A good relative to it could be the well forgoten gen from the MS-DOS era - edlin, alrhough RIDE has much more functions. Yes, it is unusual, but once understood it can be very efficient. Obviously being very new and written from scratch, I expect to see and fix bugs in it...

For C libraries, you can use the command ./lsl <lib_name> to see what is inside them. For reference to the standard C functions (C.impl follows the standard model), you can use https://www.cplusplus.com/reference/clibrary/
There are other online references as well (cppreference.com, cprogramming.com, etc.) as well as countless books and articles.

I will post some sample programs when I find enough free time to write them... ;)
Anything particular you want to see?
Edited 2021-04-03 00:19 by knivd
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 02:24pm 02 Apr 2021
Copy link to clipboard 
Print this post

This is a truly wonderful/significant development and word needs to spread via other forums, etc.

These simple platforms are very conducive to learning what's important  
 
     Page 1 of 2    
Print this page
© JAQ Software 2024