Show Posts
Pages: [1]
1  Products / Arduino Due / Re: VGA output on: April 28, 2013, 01:11:12 pm
Rob, actually, I did de-obfuscate that interpreter, only to find the deobfuscated version when I was done, oh well. A sunday well spent. BASIC on the Due sure made my Apple][ days come back to me!
And yes, there are lots of BASIC interpreters to be found, sure one should fit the arduino due pretty well. I might continue on what I have, if it rains a lot this summer.

Stimmer, I did something similar, but looked at it with the scope, seems decently linear.
void setup() {
    pinMode(36,OUTPUT);    pinMode(37,OUTPUT);
    pinMode(38,OUTPUT);    pinMode(39,OUTPUT);
    pinMode(40,OUTPUT);    pinMode(41,OUTPUT);
int i=0;
void loop() { // C.4 - C.9
    REG_PIOC_ODSR = i<<4;
    if (++i>64) i=0;

I really like the VHS quality on this, 40 columns of text and all that! That space-age, Z80/6502 look smiley
Will try with 82 ohm resistors, but unloaded the voltages seems pretty spot on, according to the composite video wiki page.
2  Products / Arduino Due / Re: VGA output on: April 27, 2013, 09:07:44 pm
@Graynomad Yes, it runs BASIC, a very limited version from the obfuscated C contests!

I was coding away on a bit more advanced version, parallel with a simple emulator running on windows but I got on to other things, so that is stalled at the moment. Don't know where to host that code, can send by mail or something if you like!

All inspired by the VGA lib thanks to @stimmer, great work! Just tried the PAL version on a little car DVD panel with medium succes. It shows very nice stable black and white, but lots of color fringe. I suspect my soldering, will try that again soon.
Also, doesn't composite video need a 75 ohm resistor to ground?

edit: Got the color working with an R 2R ladder made of 68 and 150 ohm resistors, looks much better now.
3  Products / Arduino Due / Re: VGA output on: January 24, 2013, 12:07:52 pm
I used the REG_PWM version, that works with serial!

void PWM_Handler()
  long dummy=REG_PWM_ISR1;
void setupVGA()
  pinMode(42,OUTPUT);   pinMode(43,OUTPUT);                     // vsync=42 hsync=43
  pinMode(34,OUTPUT);   pinMode(35,OUTPUT);                     // blue  (35=msb,34=lsb)
  pinMode(36,OUTPUT);   pinMode(37,OUTPUT);   pinMode(38,OUTPUT); // green (38=msb,37,36=lsb)
  pinMode(39,OUTPUT);   pinMode(40,OUTPUT);   pinMode(41,OUTPUT); // red   (41=msb,40,39=lsb)
  REG_PIOC_OWER= 0x3fc;
  REG_PMC_PCER0= 1<<27;

  REG_PIOA_PDR |=1<<20;
  REG_PMC_PCER1= 1<<4;
  REG_PWM_WPCR= 0x50574dfc;
  REG_PWM_CLK= 0x00010001;
  REG_PWM_DIS= 1<<2;
  REG_PWM_CMR2=0x0;   //  REG_PWM_CMR2=0x200;  //to invert hsync polarity
  REG_PWM_ENA= 1<<2; 

4  Products / Arduino Due / Re: VGA output on: December 20, 2012, 11:22:18 am
I played with this a bit, reduced the color screen to 320x200 so it has some memory left for other things, like BASIC. Got to say: love it!
Pages: [1]