Blinkenlights

Blinkenlights

Sunday 29 April

So I'm not going to post here for every little thing that I get working, but this is a milestone, so it deserves a post
 
I got the XMOS workspace set up, with the correct (24MHz) oscillator defined, and the chip configured to run at 500 MHz. This was actually pretty easy once someone on the xcore forum pointed out I'd missed a checkbox on the 'New Project' dialogue
 
Getting a trivial 'xc' program up and running  ...


  1.  
  2. #include <xs1.h>
  3. #include <timer.h>
  4.  
  5. port leds = XS1_PORT_4F;
  6.  
  7. #define NUM_PATTERNS 6
  8. int patterns[NUM_PATTERNS] = {1,2,4,8,4,2};
  9.  
  10. int main(void)
  11. {
  12. int delay = 50; // delay 50 ms
  13. int counter = 0; // A counter for the patterns array
  14. while(1)
  15. {
  16. leds <: patterns[counter]; // Drive the next led pattern
  17. delay_milliseconds(delay); // Wait
  18.  
  19. counter++; // Pick the next pattern
  20. if (counter == NUM_PATTERNS) // If we are at the last pattern
  21. counter = 0; // then wrap around.
  22.  
  23. }
  24. return 0;
  25. }
  26.  


... gives me the traditional hello-world hardware equivalent of "blinkenlights"
up and running (warning: movie is ~10MB). 
 
If you look on the video, you can see the little yellow switch close to the XTAG connector. That switch allows power for the board to be sourced from the XTAG itself, so there's no need to power the board separately, which is nice
 
In other news, I sent an email to Seeed with a photo showing how the SDRAM was rotated. Hopefully they can do something about it

Back