A project to implement a console using the Mbed using VGA for video output and a PS/2 keyboard for the input. The eventual goal is to also include tools for managing SD cards, and a semi-self-hosting programming environment.

Dependencies:   PS2_MbedConsole fastlib SDFileSystem vga640x480g_mbedconsole lightvm mbed

MbedConsole is a cool little project to have a self-contained computer all on an Mbed. So far it has VGA and PS/2 support and can stand alone without a computer powering it. Next planned features are SD card support and a lightweight programmable VM complete with a file editor and self-hosted assembler.

You can view additional details about it at http://earlz.net/tags/mbedconsole

Committer:
earlz
Date:
Wed Sep 26 04:12:57 2012 +0000
Revision:
9:4211d638b2e9
Parent:
1:eb209f0468de
Child:
10:bda85442b674
PS/2 keyboard now receives scan codes at least

Who changed what in which revision?

UserRevisionLine numberNew contents of line
earlz 1:eb209f0468de 1 #include "mbedconsole.h"
earlz 9:4211d638b2e9 2 #include "clock.h"
earlz 9:4211d638b2e9 3 #include "i2s.h"
earlz 9:4211d638b2e9 4 #include "nvic.h"
earlz 9:4211d638b2e9 5
earlz 9:4211d638b2e9 6
earlz 9:4211d638b2e9 7 PS2Keyboard *ps2kb;
earlz 0:6906dbde03da 8 DigitalOut myled(LED1);
earlz 0:6906dbde03da 9
earlz 1:eb209f0468de 10
earlz 1:eb209f0468de 11 Serial serial(USBTX, USBRX);
earlz 9:4211d638b2e9 12 ConsoleStream console;
earlz 0:6906dbde03da 13
earlz 1:eb209f0468de 14
earlz 0:6906dbde03da 15
earlz 0:6906dbde03da 16 int main() {
earlz 0:6906dbde03da 17 init_vga();
earlz 0:6906dbde03da 18 serial.baud(115200);
earlz 9:4211d638b2e9 19 serial.printf("Initializing PS/2..");
earlz 9:4211d638b2e9 20 ps2kb=new PS2Keyboard(p12, p11); // CLK, DAT
earlz 9:4211d638b2e9 21 fl_select_clock_i2s(FL_CLOCK_DIV1); // assume 100MHz
earlz 9:4211d638b2e9 22 fl_i2s_set_tx_rate(1,4); // set 25 MHz pixel clock
earlz 0:6906dbde03da 23
earlz 9:4211d638b2e9 24
earlz 9:4211d638b2e9 25 NVIC_SetPriority( EINT3_IRQn, 255 );
earlz 9:4211d638b2e9 26 serial.printf("Done\n");
earlz 0:6906dbde03da 27 vga_cls();
earlz 0:6906dbde03da 28
earlz 0:6906dbde03da 29 while(1)
earlz 0:6906dbde03da 30 {
earlz 1:eb209f0468de 31 vputs("mbedConsole by Jordan Earls\n");
earlz 1:eb209f0468de 32 shell_begin();
earlz 0:6906dbde03da 33 }
earlz 0:6906dbde03da 34 }