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
Diff: main.cpp
- Revision:
- 9:4211d638b2e9
- Parent:
- 1:eb209f0468de
- Child:
- 10:bda85442b674
--- a/main.cpp Sat Sep 22 04:14:01 2012 +0000 +++ b/main.cpp Wed Sep 26 04:12:57 2012 +0000 @@ -1,19 +1,29 @@ #include "mbedconsole.h" - - - +#include "clock.h" +#include "i2s.h" +#include "nvic.h" + + +PS2Keyboard *ps2kb; DigitalOut myled(LED1); Serial serial(USBTX, USBRX); - +ConsoleStream console; int main() { init_vga(); serial.baud(115200); + serial.printf("Initializing PS/2.."); + ps2kb=new PS2Keyboard(p12, p11); // CLK, DAT + fl_select_clock_i2s(FL_CLOCK_DIV1); // assume 100MHz + fl_i2s_set_tx_rate(1,4); // set 25 MHz pixel clock + + NVIC_SetPriority( EINT3_IRQn, 255 ); + serial.printf("Done\n"); vga_cls(); while(1)