element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi Projects
  • Products
  • Raspberry Pi
  • Raspberry Pi Projects
  • More
  • Cancel
Raspberry Pi Projects
Blog XMOS startKIT: XMOS and Raspberry Pi Oscilloscope XAE 1000
  • Blog
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 22 Jun 2014 2:02 PM Date Created
  • Views 11207 views
  • Likes 7 likes
  • Comments 32 comments
  • educational
  • xmos_startkit
  • rpiintermediate
  • education
  • educator
  • educators
  • rasberry
  • oscilloscope
  • raspberry-pi
  • raspberrypi
  • oscilloscopes
  • raspberry_pi_projects
  • xcore
  • test&measurement
  • xmos
Related
Recommended

XMOS startKIT: XMOS and Raspberry Pi Oscilloscope XAE 1000

shabaz
shabaz
22 Jun 2014

Introduction

This project provides “oscilloscope-like” capabilities for the ultra low cost of £12, with near-zero soldering required. It’s not a very practical oscilloscope (and this project is really just a quick proof-of-concept written in a couple of evenings) but the information here may be reusable for analog sensing applications and for any other projects that require plotting data to a screen. It could possibly be useful as-is to demonstrate low frequency waveforms in a teaching environment where a real oscilloscope is unavailable. The oscilloscope output is viewed in a web browser, so it is possible to project the output onto a large screen for example. The 12-bit resolution helps here too. All source code is published at the end of this post.

Here is an example video, showing a real signal from a 555 based circuit (it was a sawtooth circuit, click here to download if needed). You can see that it is quite responsive, with multiple refreshes per second.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Here is another video, showing a sine wave signal being ramped up in frequency:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

To construct, all that is required is an XMOS startKIT boardXMOS startKIT board (less than £12, or free if you obtained one during the XMOS giveaway at the start of the year) and some wires (and a Raspberry PiRaspberry Pi as tested here, but other boards such as the BeagleBone Black or RIoTboard would also work).

image

 

What is the XMOS startKIT?

The XMOS startKIT is a compact (slightly larger than a credit card) board that contains an XMOS multi-cored processor. It has a number of distinct advantages over other processors that make it ideal for projects that require real-time operations. The chip also contains a built-in analog-to-digital converter (ADC). Having all this on a single £10 board makes it attractive for data logging capability. Here is a photo of the setup, showing the startKIT connected up to the RPI.

image

 

The startKIT is powered and programmed using a USB cable. Information on how to do this is in an earlier post. Not shown in the photo, if desired, both the startKIT and the RPI can be powered from a single USB supply connected to the startKIT board. The RPI doesn’t need a USB supply. To achieve this, connect a wire from the startKIT connector labelled J8 pin 13 (5V) to the RPI connector pin 4.

 

Why is an Oscilloscope useful?

In a nutshell it allows you to graphically see electrical signals over time, at rates far higher than a multimeter could show. A multimeter may read one value, but observing the detail over time using an oscilloscope may reveal a very different picture. This project here is not really an oscilloscope, however it does attempt to implement some oscilloscope-like features such as trigger capability and sweep modes and on-screen cursors for trace measurement. It is lacking in good sample rate, any front end filter and in fact it is lacking the entire front half of a real oscilloscope which would normally include AC/DC input capabilities and gain adjustment. Since it is not really an oscilloscope, from now on it will be referred to as the XMOS Analog Examiner or XAE. It can be used to examine simple circuits at low speed. Higher sample rates require more hardware. An example project is here using a BeagleBone Black which achieved around 20 million samples per second. It is still not a complete oscilloscope though. Real oscilloscopes have come down in price, and it is possible to purchase a practical one new for £200 upward. For a new center at my workplace, we are purchasing multiple oscilloscopes. The lowest cost one we have selected is a Tektronix TBS1052BTektronix TBS1052B because it offers dual channels at 50MHz for a reasonable cost and we wanted one that can be taken home by employees. There are lower priced options, but we liked the high-resolution display on this model and the usual Tektronix reliability.

 

XMOS startKIT: More Information

If you’re interested in finding our more about the XMOS startKIT, the two links that follow may be useful. This is part three in a series of posts on the XMOS startKIT. The XAE 1000 here is a by-product that, while not a practical oscilloscope, was used to try out the analog capability of the XMOS board.

 

Part 1 entitled XMOS startKIT: Introduction, Terminology/Architecture, Getting Started and Example Programs covered the following topics:

  • Introduction/Terminology/Architecture
  • Running Tasks in Parallel
  • XMOS and IoT
  • Installing the development environment xTIMEcomposer
  • Building and running an Example Program
  • Example: Controlling a Servo
  • Example: Multi-tasking
  • Troubleshooting/Debugging

 

Part 2 was called XMOS startKIT: Building an XMOS and Raspberry Pi Robot XMP-1 and it covered a few different things. In particular it introduced a general-purpose framework to connect the XMOS startKIT board to the Raspberry Pi using the Serial Peripheral Interface (SPI). This capability was used to construct a robot. Part 2 covered these topics:

  • Robot introduction. Hardware and Software overview and Circuit/Wiring diagram
  • Serial Peripheral Interface (SPI) introduction
  • Connecting the Raspberry Pi to the XMOS startKIT
  • SPI implementation on the XMOS and Raspberry Pi boards
  • Implementing multiple servo control
  • Creating a Raspberry Pi web server and application using Javascript and Node.js
  • Hardware assembly of a robot

 

Part 2 covered methods of transferring data from the Raspberry Pi (RPI) to the XMOS board, such that servos could be controlled from a web server running on the RPI. This part 3 now covers how to use the general framework from part 2 to transfer data predominantly in the opposite direction; analog data is collected by the XMOS board, and is transferred to the RPI for display to anyone connecting to the XAE application using a web browser.

 

Solution Overview

The next two diagrams below shows the overall solution. The circuit diagram is extremely simple; just a few wires are used to connect up the two boards:

image

 

Analog data is collected by the startKIT board and this information is passed on demand to the Raspberry Pi (RPI) shown on the left. The RPI runs a web server and passes data to the user’s web browser. All graphical processing occurs in the browser. The major software components are shown below:

image

The details are discussed next, beginning with the XMOS portion.

 

XMOS software overview

The XMOS chip provides the capability to run multiple tasks in parallel. This capability is described in the first blog post. In summary different code can execute on different XMOS cores, and communication can occur between the XMOS cores using a concept known as ‘channels’.

 

The XMOS multi-cored chip also contains a built-in 4-channel analog to digital coverter (ADC). It is capable of 4096 points of resolution (12-bit) at 1 million samples per second (MSPS).  The ADC is controlled by the XMOS core using the ‘channel’ concept too. Channels were covered early on in part 1.

 

In this project, just three XMOS cores are used. One XMOS core runs a task called ‘spi_process’ which is used to handle serial peripheral bus (SPI) input/output between the XMOS device and the Raspberry Pi. Another XMOS core (running adc_task) is used to retrieve ADC captured data into a buffer of memory. A third XMOS core runs a task called ‘app’. It sits in the center and is used to retrieve the buffer data and pass it to the SPI core, and to handle trigger and sweep adjustments. The RPI can send specific instructions to make adjustments such as trigger type. These instructions are decoded by the app task. The diagram below shows the three tasks in purple, and some example message sequences below for retrieving ADC samples and for setting parameters such as the trigger level. This diagram makes more sense after reading part 2.

image

The adc_task collects 500 samples at a time (enough for one screenful) but only stores to a buffer if the trigger condition is met. A very simplistic trigger capability was implemented, and it is still buggy. It works just-about ok with most waveforms, but doesn’t maintain triggering so well with square waves. The video here shows several different types of waveforms (the view from a real oscilloscope is shown on the left for comparison). I didn’t spend much time refining the trigger capabilities.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Note that when using the attached code, the ADC needs to be enabled in the Makefile. This is done by double-clicking on ‘Makefile’ to open it, and then appending ‘-fxscope’ to the flags as shown in the screenshot below (make sure this is done for ‘Release’ and ‘Debug’) and then saving it.

image

 

Also, note that the ADC software that I used (it was found in a community tab inside the XMOS development environment) relies on an external trigger to capture data, and the trigger is hard-wired to a particular pin on the startKIT board. This means that to use SPI as well as the ADC, a different pin needs to be assigned for SPI MOSI compared to post 2 SPI wiring). The circuit diagram in this post shows that the selected pin for SPI MOSI on the XMOS board was connector J7 pin 4 which is the pin marked D12 on the startKIT silkscreen print.

 

Raspberry Pi software overview

Much like post 2, this project was predominantly coded using JavaScript because the same language can be used twice; in the web browser and on the Raspberry Pi server. It saves having to learn two languages. Node.js (the platform which will allow JavaScript to run on the RPI) and Socket.IO (the feature which will allow real-time communications between the RPI and the user’s web browser) were installed on the RPI (see post 2 for details on how to do this). A very simple C program called xmos_adc was written to handle the low-level communication to the XMOS board; it is responsible for transmitting values across the SPI interface to the XMOS board and dumping the result onto the command line.

So, to retrieve 500 samples of analog data (enough for one screenful), the following commands could be typed on the command line, where the parameter shown is a tag value:

./xmos_adc 3
./xmos_adc 0
   

The first command instructs the XMOS board that the Raspberry Pi wants to retrieve data. The second command retrieves the samples. As soon as the samples have been retrieved, the XMOS board begins to collect 500 more samples ready for subsequent collection.

 

To adjust the trigger or sweep settings, different parameters can be used.

As an example, to set the trigger level to a midpoint, the following command can be used, where for the second parameter, the range of 0-3.3V is represented by a number in the range 0-255:

./xmos_adc 6 127
   

 

Here is another example. This selects the trigger direction where 0 means rising, and 1 means falling:

./xmos_adc 8 0
   

 

Notice that the tags are mostly even numbers; a convention was used that even numbers would alert the XMOS board that no response was expected. An odd tag means that the RPI expects a response in the next SPI message. This convention was created in post 2.

 

The xmos_adc code doesn’t do anything more; all of the main logic is implemented in JavaScript. The code that is to run on the Raspberry Pi is written in a single file called index.js. It is responsible for functioning as a web server, serving up the index.html file to the user, and taking instructions from the web browser via Socket.IO and translating into xmos_adc command line instructions. Whatever xmos_adc returns is passed using Socket.IO back to the user. The code is very basic.

 

Most of the interesting stuff is coded in the HTML file. This code will run inside the web browser.There are many ways to improve the code, and the user interface too. The code should be considered just as a proof-of-concept. As soon as a connection is established using Socket.IO, the browser sends instructions to the web server to invoke retrieval of the ADC sample values. The HTML file then instructs the browser to display the screen and then immediately collect more samples. This repeats indefinitely. The process runs as fast as possible, so that the waveform refresh speed is dependent on the user’s computer and web browser. If any button is clicked, then temporarily this refresh scheme is paused while the instruction is sent to the Raspberry Pi for onward forwarding to the XMOS board, and then the sample retrieval is resumed. All graphical calculations are performed in the web browser. It means that very little processing is done on the Raspberry Pi. A JavaScript library called D3 was used to display the waveforms. Some interesting features were found possible to implement, such as direct placement of the trigger and cursors by just clicking on the display. If the user clicks on the left side of the waveform display, the trigger position is updated. If the user clicks at the top or the right side of the display, time or amplitude cursors will get displayed in red. You can see some time cursors and the trigger position in red in the waveform display at the end of this post.

 

Summary

This post completes the investigation into how to implement bidirectional information exchange between the Raspberry Pi and the XMOS startKIT board, and also examined ADC input. It was shown that JavaScript can be used to provide a very responsive user interface. Although the final XAE 1000 implementation is a novelty oscilloscope and not a true oscilloscope, it may serve some useful purpose perhaps for simple circuit demonstrations.

image

 

Source Code

See here for the source code.

  • Sign in to reply

Top Comments

  • Problemchild
    Problemchild over 11 years ago +1
    Thanks again for an excellent article sized blog post I particularly like the photo showing the SPI connection to the RPI, yes it really is that simple!! Often folk get it into their heads that it's all…
  • shabaz
    shabaz over 11 years ago in reply to Problemchild +1
    Hi John, I tried to keep this post short, but I failed a bit there! :-) Got to get that information out of my head and onto the screen, before I forget detail :-) Yes, it is super-easy, just connect up…
  • shabaz
    shabaz over 11 years ago in reply to Problemchild +1
    I just used the standard lib (spidev.c), renamed it to xmos_adc.c and made it accept command line parameters, and made it dump the output to the screen. I used TLV format for SPI, so it is possible to…
Parents
  • Former Member
    Former Member over 10 years ago

    Hi, I'm following your project but have come across some difficulties.

    I've got the code compiled and running on the Pi and the XMOS board.  I can see the Pi is polling the SPI interface, but is getting zeros returned on the MISO line.  This has been confirmed by doing ./xmos_adc.

    If I hardwire the MISO line from Pi to 3.3v, the I read 0xff's instead of 0x00.  So the Pi SPI input seems to be working.

    If I add some of your commented-out printf() calls back into the XMOS code and run it from the GUI, I can see

     

    App started

    incoming SPI

     

    but that's all.

     

    I have applied a sine wave which is level shifted to lie between approx 1v and 2v as I assume the ADC0 input has a max FSD at 3.3v?  Can't find this documented ..

     

    Can you suggest how to go about debugging this?

    -----

    Update:  I tried using this simple program:  http://www.xcore.com/forum/viewtopic.php?f=44&t=2537

    I added the -fxscope parameter to the makefile, and it works (between 1 and 9 LEDs light up depending on the voltage on ADC0).

    So there must be some difference in the way this is using the ADC.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 10 years ago in reply to Former Member

    Hi Steve,

     

    it might be worth double-checking the jumper wires with a multimeter, some of the cheap ones don't make good connections.

    Same with a ribbon cable, in case it wasn't squeezed correctly when assembled. Otherwise apart from that I can't see what could be wrong : (

    You seem to have done the right kind of troubleshooting.

    Is the ADC definitely enabled, with the -fxscope thing in Debug and Release?

    To debug, perhaps in the adc_task function (which is responsible for communicating with the in-built ADC), where it says

    abufp[i+3]=buf[i];
    abufp[i+4]=buf[i+1];

    maybe replace with

    abufp[i+3]=0x55;
    abufp[i+4]=0xaa;

     

    just to see what happens? Let me know the output when you issue the ./xmos_adc 3 and ./xmos_adc 0 commands with this change.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 10 years ago in reply to Former Member

    Hi Steve,

     

    I've just tried the original code (I downloaded it from the github location just now) and it works for me, this is the output I get (I didn't connect anything to the ADC pin):

    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 3
    00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 0
    83,03,e8,00,11,00,12,00,13,00,11,00,10,00,10,00,0f,00,12,00,10,00,10,00,10,00,0f,00,11,00,10,00,10,00,0f,00,10,00,0f,00,10,00,10,00,10,00,10,00,0f,00,10,00,0f,00,11,00,10,00,10,00,10,00,10,00,10,00,10,00,0e,00,0e,00,0f,00,0f,00,10,00,10,00,10,00,10,00,0e,00,0f,00,10,00,0e,00,11,00,10,00,0f,00,0f,00,10,00,10,00,11,00,0f,00,10,00,10,00,0e,00,0f,00,11,00,10,00,11,00,11,00,11,00,12,00,11,00,12,00,11,00,0c,00,10,00,10,00,0f,00,10,00,0f,00,11,00,12,00,11,00,11,00,11,00,12,00,13,00,12,00,11,00,10,00,10,00,10,00,10,00,11,00,11,00,10,00,10,00,0f,00,0f,00,10,00,0f,00,10,00,10,00,10,00,0f,00,10,00,11,00,10,00,10,00,0f,00,0f,00,11,00,11,00,11,00,10,00,11,00,0f,00,10,00,0e,00,10,00,0f,00,10,00,11,00,11,00,11,00,11,00,10,00,0f,00,10,00,0f,00,10,00,10,00,10,00,10,00,0f,00,10,00,10,00,0f,00,10,00,10,00,0f,00,10,00,10,00,10,00,10,00,0f,00,0f,00,11,00,11,00,10,00,11,00,10,00,10,00,10,00,11,00,10,00,10,00,10,00,0f,00,10,00,11,00,11,00,0f,00,10,00,10,00,10,00,10,00,0f,00,0f,00,0e,00,0f,00,10,00,0f,00,11,00,0f,00,0f,00,10,00,0f,00,12,00,10,00,0f,00,0c,00,0f,00,0f,00,0f,00,11,00,10,00,10,00,0e,00,11,00,10,00,10,00,10,00,0f,00,10,00,10,00,0f,00,10,00,11,00,11,00,0e,00,11,00,10,00,11,00,10,00,10,00,0e,00,0f,00,10,00,10,00,10,00,11,00,11,00,11,00,11,00,11,00,11,00,11,00,11,00,11,00,11,00,12,00,10,00,10,00,10,00,10,00,10,00,10,00,10,00,10,00,10,00,12,00,11,00,11,00,11,00,10,00,10,00,10,00,10,00,0f,00,0f,00,0f,00,11,00,0d,00,12,00,10,00,10,00,0e,00,10,00,10,00,11,00,11,00,10,00,10,00,0f,00,10,00,10,00,10,00,0e,00,10,00,10,00,11,00,11,00,10,00,0f,00,0e,00,11,00,10,00,11,00,10,00,12,00,11,00,12,00,10,00,11,00,10,00,0e,00,10,00,11,00,11,00,11,00,10,00,10,00,10,00,10,00,11,00,11,00,0f,00,12,00,11,00,11,00,11,00,12,00,11,00,10,00,11,00,10,00,12,00,12,00,11,00,0e,00,0e,00,10,00,13,00,11,00,10,00,10,00,0f,00,10,00,11,00,10,00,10,00,0f,00,0e,00,10,00,10,00,10,00,10,00,0f,00,10,00,11,00,11,00,0f,00,10,00,0f,00,11,00,10,00,11,00,11,00,10,00,0f,00,10,00,0f,00,10,00,11,00,0e,00,11,00,10,00,10,00,10,00,10,00,0f,00,0f,00,0f,00,11,00,11,00,0e,00,10,00,0f,00,0f,00,10,00,10,00,0f,00,10,00,0e,00,10,00,10,00,0e,00,0f,00,0f,00,10,00,0f,00,0f,00,10,00,11,00,10,00,0f,00,0f,00,0d,00,11,00,10,00,10,00,0f,00,10,00,10,00,11,00,11,00,10,00,10,00,0f,00,11,00,11,00,11,00,11,00,10,00,10,00,10,00,0e,00,10,00,10,00,0e,00,10,00,10,00,11,00,11,00,10,00,10,00,10,00,10,00,10,00,10,00,11,00,11,00,10,00,10,00,0c,00,0d,00,0e,00,0f,00,0f,00,10,00,10,00,0f,00,0f,00,0f,00,11,00,12,00,10,00,11,00,10,00,0f,00,0f,00,0f,00,11,00,10,00,10,00,10,00,11,00,10,00,10,00,11,00,0f,00,11,00,11,00,11,00,11,00,11,00,11,00,11,00,11,00,11,00,11,00,10,00,11,00,11,00,10,00,11,00,12,00,11,00,10,00,10,00,0f,00,10,00,12,00,11,00,10,00,10,00,0f,00,0f,00,10,00,10,00,10,00,10,00,0f,00,10,00,10,00,10,00,10,00,0e,00,11,00,10,00,0f,00,10,00,10,00,0f,00,0f,00,10,00,10,00,11,00,0f,00,0f,00,10,00,10,00,10,00,11,00,11,00,0f,00,10,00,0f,00,11,00,12,00,0e,00,11,00,10,00,0e,00,10,00,10,00,11,00,11,00,10,00,11,00,12,00,0f,00,10,00,10,00,0f,00,12,00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 3
    00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 0
    83,03,e8,03,67,03,a1,03,a2,03,9d,03,9f,03,9e,03,9b,03,9d,03,9e,03,9a,03,9a,03,9e,03,99,03,9c,03,95,03,96,03,9b,03,9a,03,9a,03,9d,03,9d,03,99,03,96,03,9c,03,a0,03,9a,03,98,03,9a,03,9b,03,98,03,9b,03,9a,03,9c,03,95,03,9d,03,9b,03,a0,03,9b,03,9d,03,9f,03,99,03,97,03,99,03,9b,03,98,03,99,03,99,03,99,03,99,03,9d,03,9a,03,99,03,9c,03,9b,03,9a,03,9e,03,9b,03,9b,03,99,03,98,03,9b,03,9d,03,9d,03,98,03,98,03,9e,03,9d,03,97,03,9b,03,9b,03,97,03,99,03,9b,03,9c,03,9a,03,9d,03,9b,03,9a,03,98,03,9c,03,9a,03,9d,03,99,03,98,03,9b,03,99,03,a0,03,9d,03,9b,03,98,03,98,03,9d,03,9c,03,9c,03,9d,03,98,03,97,03,97,03,9b,03,9c,03,97,03,9a,03,9c,03,99,03,a0,03,99,03,99,03,9a,03,98,03,99,03,9d,03,9a,03,95,03,9c,03,97,03,93,03,9a,03,9c,03,98,03,94,03,99,03,95,03,99,03,9b,03,9b,03,96,03,92,03,9d,03,9a,03,97,03,9c,03,93,03,9b,03,95,03,94,03,98,03,9f,03,95,03,99,03,99,03,9c,03,99,03,9c,03,9a,03,99,03,94,03,97,03,9b,03,9a,03,96,03,98,03,97,03,97,03,9a,03,9b,03,9a,03,97,03,9b,03,99,03,9b,03,98,03,9b,03,9a,03,9c,03,93,03,9d,03,98,03,92,03,9b,03,97,03,9a,03,96,03,9b,03,98,03,98,03,97,03,9a,03,99,03,9b,03,97,03,98,03,99,03,93,03,97,03,9a,03,98,03,98,03,97,03,99,03,97,03,93,03,99,03,99,03,9c,03,95,03,95,03,96,03,96,03,95,03,97,03,96,03,93,03,95,03,95,03,96,03,95,03,93,03,91,03,91,03,95,03,95,03,93,03,95,03,98,03,93,03,90,03,8f,03,91,03,97,03,93,03,92,03,93,03,91,03,8d,03,91,03,8f,03,95,03,90,03,91,03,91,03,90,03,8f,03,92,03,90,03,90,03,91,03,93,03,90,03,8f,03,8c,03,94,03,8f,03,91,03,91,03,8c,03,91,03,8b,03,90,03,91,03,8c,03,8b,03,8d,03,90,03,8d,03,8d,03,8f,03,8c,03,8a,03,8d,03,8e,03,8c,03,89,03,8b,03,8d,03,89,03,8d,03,89,03,8a,03,8f,03,8a,03,8c,03,8a,03,90,03,8b,03,8b,03,89,03,8a,03,8a,03,89,03,87,03,8b,03,88,03,89,03,87,03,8b,03,88,03,83,03,88,03,87,03,87,03,86,03,87,03,86,03,84,03,83,03,87,03,89,03,87,03,81,03,85,03,87,03,81,03,86,03,83,03,85,03,81,03,84,03,85,03,81,03,85,03,84,03,84,03,80,03,7f,03,7d,03,7d,03,7c,03,7c,03,7a,03,77,03,75,03,79,03,73,03,74,03,71,03,71,03,71,03,6c,03,6d,03,6d,03,6b,03,69,03,6b,03,67,03,67,03,5e,03,67,03,66,03,63,03,69,03,65,03,64,03,63,03,63,03,61,03,65,03,61,03,5c,03,61,03,5d,03,5f,03,60,03,5e,03,5a,03,5d,03,5f,03,59,03,5a,03,5f,03,58,03,59,03,59,03,59,03,59,03,57,03,57,03,59,03,57,03,52,03,57,03,56,03,5a,03,55,03,55,03,55,03,4f,03,54,03,52,03,55,03,51,03,53,03,51,03,51,03,50,03,52,03,4f,03,4e,03,50,03,51,03,4e,03,49,03,49,03,4f,03,4d,03,49,03,4d,03,49,03,49,03,4d,03,49,03,4b,03,47,03,46,03,48,03,48,03,43,03,43,03,43,03,45,03,41,03,47,03,42,03,42,03,40,03,42,03,41,03,43,03,3e,03,3f,03,42,03,3b,03,40,03,3b,03,3d,03,39,03,3b,03,3e,03,39,03,39,03,37,03,38,03,34,03,3c,03,37,03,36,03,34,03,37,03,38,03,31,03,32,03,32,03,33,03,32,03,2d,03,2d,03,31,03,2b,03,2a,03,2d,03,2c,03,25,03,29,03,2a,03,2b,03,29,03,26,03,25,03,22,03,28,03,27,03,26,03,23,03,28,03,21,03,20,03,25,03,20,03,20,03,1f,03,1f,03,1d,03,20,03,19,03,1a,03,24,03,20,03,1a,03,1d,03,1f,03,1d,03,1a,03,1f,03,1b,03,17,03,1b,03,1b,03,1b,03,1a,03,19,03,1a,03,19,03,14,03,19,03,1d,03,1d,03,19,03,16,03,19,03
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 3
    00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 0
    83,03,e8,08,1f,08,34,08,30,08,2d,08,2c,08,2b,08,27,08,28,08,2c,08,28,08,22,08,2a,08,25,08,26,08,26,08,23,08,24,08,23,08,21,08,23,08,23,08,20,08,23,08,1d,08,21,08,22,08,23,08,24,08,2c,08,21,08,21,08,21,08,20,08,20,08,23,08,21,08,1b,08,22,08,21,08,23,08,21,08,21,08,1f,08,1d,08,21,08,1f,08,1a,08,1f,08,1f,08,20,08,1d,08,1d,08,20,08,22,08,1d,08,20,08,20,08,21,08,18,08,21,08,1f,08,22,08,1c,08,21,08,1d,08,1d,08,21,08,20,08,21,08,1d,08,1f,08,1f,08,21,08,20,08,21,08,20,08,1d,08,1d,08,1f,08,23,08,20,08,1f,08,1f,08,1d,08,1d,08,21,08,1f,08,20,08,1d,08,1b,08,1f,08,1a,08,20,08,1d,08,1d,08,1f,08,1d,08,20,08,1d,08,20,08,1d,08,23,08,19,08,1d,08,20,08,21,08,1b,08,23,08,1f,08,1e,08,1c,08,20,08,20,08,21,08,1f,08,20,08,20,08,19,08,1c,08,1f,08,1f,08,1e,08,1b,08,20,08,1d,08,1e,08,1f,08,21,08,21,08,2c,08,1d,08,1f,08,1d,08,22,08,22,08,1e,08,1e,08,1d,08,20,08,20,08,20,08,1d,08,1d,08,1d,08,1d,08,20,08,20,08,20,08,17,08,1f,08,1d,08,1e,08,20,08,1f,08,1b,08,1f,08,1e,08,20,08,1c,08,1b,08,1e,08,1d,08,1d,08,1d,08,1d,08,1d,08,1b,08,1f,08,1d,08,1f,08,1f,08,1b,08,19,08,19,08,1d,08,1f,08,1f,08,1b,08,1d,08,20,08,1c,08,1b,08,26,08,1d,08,1a,08,1d,08,1b,08,1b,08,1f,08,1b,08,1b,08,19,08,1f,08,1e,08,1c,08,19,08,1d,08,1c,08,19,08,1b,08,1d,08,1d,08,19,08,1d,08,1d,08,1e,08,1c,08,1c,08,1a,08,19,08,1b,08,1e,08,1f,08,1a,08,1f,08,20,08,19,08,1d,08,1d,08,1d,08,1d,08,1d,08,1d,08,1d,08,1b,08,1b,08,1b,08,1f,08,1d,08,1d,08,1e,08,20,08,1e,08,1b,08,1d,08,1d,08,23,08,1d,08,1c,08,1c,08,1e,08,1d,08,19,08,1b,08,2c,08,1f,08,19,08,20,08,21,08,20,08,19,08,1d,08,1f,08,1a,08,24,08,1c,08,1f,08,1b,08,1d,08,1e,08,21,08,1a,08,1e,08,1f,08,17,08,20,08,1f,08,1d,08,1b,08,22,08,1f,08,22,08,1c,08,1d,08,1d,08,1b,08,1d,08,20,08,21,08,1d,08,1f,08,1d,08,1f,08,1d,08,1d,08,1d,08,19,08,21,08,21,08,1f,08,1b,08,1b,08,20,08,21,08,1b,08,21,08,21,08,1d,08,1d,08,24,08,1f,08,1a,08,21,08,20,08,1e,08,1d,08,1f,08,20,08,1a,08,20,08,1b,08,21,08,1d,08,23,08,24,08,1d,08,1a,08,1d,08,1f,08,22,08,1b,08,1b,08,1e,08,1a,08,20,08,1f,08,20,08,1e,08,1e,08,20,08,1f,08,1e,08,1f,08,1f,08,20,08,1b,08,1f,08,21,08,1a,08,22,08,20,08,1d,08,1d,08,21,08,21,08,1b,08,1f,08,1f,08,1f,08,19,08,1b,08,1c,08,20,08,1d,08,1f,08,20,08,20,08,1c,08,1b,08,1d,08,17,08,23,08,1f,08,1d,08,19,08,1f,08,1d,08,20,08,20,08,1f,08,1d,08,19,08,1d,08,1f,08,20,08,1b,08,1e,08,1d,08,1f,08,1e,08,1f,08,1e,08,18,08,22,08,1d,08,21,08,1e,08,1c,08,20,08,1d,08,1d,08,20,08,1e,08,1c,08,20,08,1d,08,1f,08,1a,08,1f,08,1d,08,1c,08,1f,08,1f,08,1f,08,18,08,1a,08,1e,08,1d,08,1d,08,1d,08,21,08,20,08,1d,08,20,08,1f,08,19,08,1d,08,1f,08,1f,08,17,08,1f,08,20,08,20,08,1c,08,1e,08,1d,08,1b,08,20,08,1f,08,21,08,1e,08,1d,08,1c,08,1d,08,21,08,1b,08,1d,08,1b,08,1f,08,1f,08,21,08,1b,08,1c,08,1d,08,1f,08,20,08,20,08,1d,08,17,08,1c,08,1b,08,21,08,1b,08,1e,08,1b,08,1d,08,1f,08,24,08,1f,08,19,08,1d,08,1d,08,1d,08,1e,08,1b,08,1d,08,1b,08,1a,08,1f,08,1e,08,21,08,1e,08,1b,08,1d,08,19,08,20,08,1f,08,1e,08,1c,08,1f,08,1e,08,1d,08,1c,08,1c,08,1d,08,1f,08,1b,08,1f,08,1f,08,1b,08,1e,08,1d,08,1d,08,1c,08,1f,08,24,08,1c,08,1d,08
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 3
    00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 0
    83,03,e8,00,9b,00,a4,00,9c,00,95,00,a0,00,98,00,a1,00,99,00,a2,00,9a,00,a3,00,9a,00,a3,00,99,00,a4,00,9c,00,94,00,a0,00,98,00,a0,00,98,00,a3,00,99,00,a2,00,9a,00,a3,00,99,00,a3,00,9a,00,a4,00,9b,00,a4,00,9b,00,a4,00,9c,00,95,00,9f,00,96,00,a2,00,99,00,a3,00,9a,00,a2,00,99,00,a3,00,9a,00,a4,00,9b,00,a1,00,9a,00,a3,00,9a,00,a3,00,99,00,a3,00,9a,00,a4,00,9b,00,a5,00,9a,00,a5,00,9c,00,95,00,9e,00,98,00,a0,00,99,00,a3,00,99,00,a4,00,9b,00,a4,00,9b,00,a3,00,9b,00,a4,00,9b,00,a3,00,99,00,a3,00,9a,00,a4,00,9c,00,94,00,9f,00,97,00,a2,00,9a,00,a3,00,98,00,a3,00,9a,00,a3,00,9b,00,a3,00,98,00,a2,00,99,00,a3,00,99,00,a4,00,9b,00,a4,00,9a,00,a4,00,9d,00,95,00,9f,00,98,00,a2,00,97,00,a4,00,9b,00,a4,00,9b,00,a3,00,99,00,a5,00,9b,00,a4,00,9b,00,a1,00,99,00,a3,00,9a,00,a3,00,98,00,a2,00,99,00,a4,00,9c,00,94,00,9d,00,97,00,a1,00,9a,00,a3,00,99,00,a4,00,9c,00,95,00,a0,00,96,00,a0,00,99,00,a2,00,9a,00,a4,00,9b,00,a4,00,9d,00,94,00,9f,00,99,00,a3,00,99,00,a2,00,9a,00,a2,00,9b,00,a4,00,99,00,a4,00,9c,00,95,00,a0,00,98,00,a3,00,9a,00,a3,00,9a,00,a5,00,9b,00,a5,00,9a,00,a4,00,9b,00,a5,00,9c,00,92,00,a0,00,97,00,a2,00,9a,00,a2,00,9b,00,a4,00,9a,00,a4,00,9c,00,94,00,9f,00,97,00,a1,00,99,00,a2,00,9b,00,a4,00,98,00,a3,00,9a,00,a3,00,9b,00,a3,00,99,00,a5,00,9b,00,a5,00,9c,00,94,00,a0,00,97,00,a0,00,9a,00,a4,00,9b,00,a4,00,9b,00,a4,00,9d,00,96,00,a0,00,97,00,a0,00,99,00,a4,00,9b,00,a4,00,9c,00,94,00,a0,00,99,00,a3,00,98,00,a2,00,9b,00,a5,00,9c,00,96,00,a1,00,98,00,a1,00,99,00,a3,00,99,00,a3,00,99,00,a2,00,99,00,a3,00,9a,00,a4,00,9a,00,a5,00,9b,00,a5,00,9c,00,96,00,a0,00,97,00,a3,00,99,00,a3,00,99,00,a2,00,99,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a3,00,9a,00,a2,00,98,00,a4,00,9b,00,a6,00,9c,00,95,00,a0,00,97,00,a3,00,99,00,a3,00,99,00,a2,00,99,00,a2,00,9b,00,a3,00,99,00,a4,00,9b,00,a4,00,9a,00,a5,00,9b,00,a5,00,9c,00,95,00,a0,00,98,00,a3,00,99,00,a3,00,98,00,a3,00,9a,00,a4,00,9b,00,a4,00,9b,00,a4,00,9e,00,95,00,a1,00,96,00,a4,00,9a,00,a4,00,9c,00,94,00,9f,00,97,00,a2,00,99,00,a3,00,97,00,a3,00,99,00,a5,00,9b,00,a5,00,9b,00,a5,00,9a,00,a5,00,9d,00,93,00,9f,00,97,00,a3,00,97,00,a3,00,9a,00,a4,00,99,00,a4,00,9c,00,95,00,a4,00,9b,00,a4,00,9c,00,93,00,9e,00,96,00,a2,00,98,00,a1,00,99,00,a3,00,99,00,a3,00,98,00,a2,00,9a,00,a4,00,9b,00,a4,00,9a,00,a4,00,9c,00,95,00,a1,00,96,00,a2,00,99,00,a3,00,9a,00,a4,00,9a,00,a4,00,9a,00,a5,00,9d,00,95,00,a1,00,98,00,a3,00,99,00,a4,00,9b,00,a3,00,9a,00,a3,00,9b,00,a5,00,9b,00,a4,00,9b,00,a3,00,9c,00,95,00,a0,00,95,00,a1,00,99,00,a3,00,9a,00,a3,00,99,00,a3,00,9b,00,a4,00,9c,00,93,00,a0,00,98,00,a1,00,97,00,a4,00,9b,00,a3,00,99,00,a3,00,9a,00,a3,00,99,00,a2,00,99,00,a1,00,9b,00,a4,00,9b,00,a5,00,9b,00,a4,00,99,00,a8,00,9c,00,94,00,9f,00,98,00,a3,00,98,00,a3,00,99,00,a3,00,9a,00,a3,00,99,00,a2,00,9a,00,a3,00,9a,00,a3,00,9c,00,93,00,9f,00,96,00,a2,00,97,00,a2,00,9b,00,a3,00,9a,00,a4,00,9c,00,94,00,a0,00,96,00,a1,00,99,00,a3,00,9a,00,a4,00,9a,00,a4,00,9c,00,95,00,a1,00,97,00,a1,00,99,00,a3,00,99,00,a3,00,9a,00,a3,00,99,00,a3,00,9a,00,a4,00,9a,00,a5,00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 3
    00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 0
    83,03,e8,00,9c,00,94,00,a2,00,99,00,a2,00,99,00,a5,00,9b,00,a5,00,9c,00,95,00,a0,00,97,00,a1,00,97,00,a3,00,9b,00,a3,00,99,00,a1,00,9c,00,94,00,a0,00,98,00,a1,00,98,00,a4,00,9c,00,94,00,a2,00,98,00,a2,00,98,00,a3,00,9a,00,a2,00,9a,00,a1,00,9a,00,a3,00,9a,00,a3,00,9a,00,a4,00,9c,00,93,00,9f,00,97,00,a3,00,98,00,a1,00,9a,00,a4,00,9b,00,a4,00,9b,00,a4,00,9c,00,95,00,a0,00,97,00,a2,00,99,00,a2,00,9a,00,a4,00,99,00,a2,00,9a,00,a5,00,9a,00,a5,00,9c,00,95,00,9f,00,99,00,a3,00,98,00,a4,00,9b,00,a4,00,9d,00,94,00,a0,00,98,00,a2,00,99,00,a3,00,99,00,a5,00,9b,00,a4,00,99,00,a5,00,9d,00,94,00,a1,00,97,00,a2,00,97,00,a4,00,9b,00,a2,00,9a,00,a4,00,9c,00,95,00,a1,00,99,00,a0,00,9a,00,a6,00,9b,00,a2,00,9a,00,a4,00,9b,00,a5,00,9c,00,96,00,a0,00,97,00,a3,00,98,00,a4,00,9b,00,a2,00,9b,00,a4,00,9c,00,93,00,9f,00,97,00,a0,00,99,00,a3,00,9a,00,a2,00,99,00,a3,00,99,00,a4,00,9b,00,a2,00,99,00,a4,00,9c,00,94,00,a1,00,98,00,a2,00,99,00,a3,00,9b,00,a1,00,9a,00,a4,00,99,00,a5,00,9d,00,95,00,a1,00,98,00,a2,00,9a,00,a4,00,9b,00,a3,00,99,00,a4,00,9b,00,a5,00,9c,00,95,00,9e,00,98,00,a2,00,9b,00,a4,00,9c,00,95,00,9f,00,98,00,a3,00,99,00,a2,00,99,00,a4,00,9b,00,a5,00,9d,00,94,00,a0,00,97,00,a2,00,9a,00,a3,00,99,00,a3,00,99,00,a3,00,9a,00,a5,00,9b,00,a4,00,9c,00,94,00,a1,00,99,00,a2,00,99,00,a4,00,9b,00,a4,00,9c,00,95,00,a0,00,97,00,a1,00,9a,00,a4,00,9a,00,a3,00,9a,00,a4,00,9a,00,a5,00,9c,00,95,00,a1,00,97,00,a3,00,99,00,a3,00,98,00,a3,00,99,00,a4,00,9c,00,94,00,a0,00,97,00,a1,00,99,00,a3,00,9a,00,a5,00,9b,00,a5,00,9d,00,96,00,a1,00,99,00,a4,00,9b,00,a5,00,9c,00,95,00,a0,00,95,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a1,00,9c,00,95,00,9e,00,96,00,a1,00,99,00,a2,00,9a,00,a3,00,99,00,a5,00,9b,00,a5,00,9c,00,94,00,a0,00,97,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a2,00,9b,00,a4,00,9a,00,a5,00,9b,00,a4,00,9e,00,95,00,a1,00,99,00,a3,00,99,00,a5,00,9b,00,a3,00,99,00,a3,00,99,00,a4,00,9c,00,94,00,9f,00,98,00,a0,00,97,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a4,00,9b,00,a3,00,9b,00,a1,00,9a,00,a4,00,9a,00,a4,00,9b,00,a5,00,9b,00,a6,00,9b,00,a4,00,9c,00,93,00,a0,00,98,00,a1,00,99,00,a2,00,99,00,a4,00,9b,00,a5,00,9a,00,a6,00,9d,00,97,00,a0,00,98,00,a2,00,99,00,a3,00,98,00,a5,00,9c,00,93,00,9f,00,97,00,9f,00,98,00,a1,00,9a,00,a4,00,9b,00,a5,00,9b,00,a4,00,9a,00,a5,00,9c,00,95,00,a1,00,98,00,a2,00,98,00,a3,00,9a,00,a4,00,9b,00,a3,00,99,00,a2,00,9a,00,a4,00,9a,00,a4,00,9c,00,95,00,a1,00,99,00,a4,00,99,00,a5,00,9b,00,a7,00,9a,00,a5,00,9c,00,93,00,9f,00,97,00,a2,00,9b,00,a3,00,99,00,a4,00,9c,00,94,00,a0,00,97,00,a1,00,99,00,a4,00,9b,00,a4,00,9a,00,a5,00,9c,00,95,00,a0,00,98,00,a2,00,98,00,a3,00,99,00,a3,00,9a,00,a2,00,99,00,a3,00,9b,00,a3,00,99,00,a4,00,9a,00,a4,00,9c,00,95,00,a0,00,98,00,a1,00,99,00,a4,00,9e,00,97,00,a0,00,98,00,a2,00,99,00,a3,00,98,00,a3,00,99,00,a3,00,9a,00,a5,00,9a,00,a4,00,9c,00,94,00,a1,00,97,00,a2,00,98,00,a3,00,9a,00,a3,00,9a,00,a5,00,9c,00,94,00,9f,00,99,00,a2,00,99,00,a3,00,9a,00,a3,00,9b,00,a5,00,9a,00,a4,00,9c,00,93,00,9f,00,97,00,a3,00,98,00,a3,00,9a,00,a4,00,99,00,a4,00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 3
    00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 0
    83,03,e8,00,9d,00,96,00,a1,00,9a,00,a3,00,98,00,a3,00,99,00,a4,00,9c,00,95,00,a0,00,98,00,a1,00,9d,00,96,00,a1,00,99,00,a2,00,9a,00,a2,00,9b,00,a3,00,99,00,a2,00,99,00,a5,00,9e,00,95,00,a1,00,98,00,a1,00,99,00,a3,00,9a,00,a2,00,9a,00,a4,00,9c,00,95,00,a0,00,98,00,a1,00,9b,00,a3,00,99,00,a2,00,99,00,a2,00,98,00,a3,00,9a,00,a3,00,99,00,a3,00,98,00,a2,00,9a,00,a3,00,99,00,a0,00,99,00,a3,00,9a,00,a2,00,9a,00,a4,00,9b,00,a5,00,9c,00,95,00,a0,00,97,00,a1,00,99,00,a2,00,9a,00,a3,00,99,00,a3,00,99,00,a4,00,9c,00,94,00,9f,00,96,00,a1,00,9a,00,a3,00,9a,00,a3,00,99,00,a3,00,9b,00,a4,00,9b,00,a4,00,9a,00,a4,00,9c,00,95,00,a1,00,98,00,a1,00,9b,00,a3,00,99,00,a3,00,98,00,a3,00,9a,00,a4,00,9a,00,a4,00,9c,00,95,00,9f,00,99,00,a2,00,97,00,a2,00,99,00,a3,00,9a,00,a3,00,99,00,a4,00,9a,00,a4,00,9b,00,a3,00,9a,00,a3,00,99,00,a3,00,9b,00,a2,00,99,00,a3,00,99,00,a3,00,9a,00,a3,00,99,00,a3,00,99,00,a3,00,9a,00,a3,00,98,00,a3,00,99,00,a5,00,9f,00,96,00,a1,00,95,00,a2,00,99,00,a4,00,9c,00,95,00,a0,00,99,00,a3,00,99,00,a3,00,98,00,a4,00,9a,00,a5,00,9c,00,95,00,a0,00,98,00,a2,00,99,00,a4,00,9a,00,a4,00,9b,00,a5,00,9a,00,a6,00,9e,00,96,00,a1,00,98,00,a2,00,98,00,a4,00,9b,00,a3,00,97,00,a3,00,9b,00,a5,00,9b,00,a3,00,99,00,a5,00,9d,00,95,00,a0,00,98,00,a2,00,9a,00,a5,00,9b,00,a3,00,9b,00,a3,00,9b,00,a4,00,9c,00,92,00,a0,00,96,00,9f,00,9b,00,a3,00,99,00,a2,00,9a,00,a4,00,9d,00,94,00,a0,00,97,00,a0,00,98,00,a2,00,9a,00,a2,00,9a,00,a4,00,9b,00,a6,00,9c,00,94,00,9f,00,97,00,a2,00,9a,00,a3,00,99,00,a4,00,9a,00,a4,00,9c,00,94,00,a1,00,97,00,a2,00,97,00,a3,00,9a,00,a4,00,9b,00,a4,00,99,00,a5,00,9c,00,95,00,9f,00,99,00,a4,00,9a,00,a4,00,9c,00,95,00,9f,00,96,00,a4,00,9b,00,a4,00,9b,00,a4,00,9b,00,a6,00,9d,00,94,00,a0,00,97,00,a1,00,99,00,a3,00,9a,00,a3,00,99,00,a1,00,99,00,a3,00,9a,00,a4,00,9b,00,a4,00,9c,00,95,00,a0,00,98,00,a1,00,99,00,a3,00,9a,00,a2,00,9a,00,a4,00,9c,00,95,00,a0,00,97,00,a2,00,99,00,a3,00,9a,00,a3,00,9a,00,a4,00,9c,00,96,00,a1,00,98,00,a2,00,98,00,a3,00,99,00,a4,00,9b,00,a5,00,9c,00,93,00,9f,00,98,00,a0,00,99,00,a3,00,99,00,a5,00,9b,00,a3,00,9a,00,a3,00,9b,00,a3,00,9a,00,a4,00,9b,00,a4,00,9c,00,96,00,a2,00,97,00,a2,00,99,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a4,00,9a,00,a3,00,9a,00,a3,00,99,00,a1,00,99,00,a4,00,9c,00,94,00,a0,00,95,00,a2,00,9b,00,a3,00,99,00,a3,00,9a,00,a4,00,9c,00,96,00,a1,00,96,00,a1,00,97,00,a3,00,99,00,a2,00,9b,00,a3,00,9a,00,a4,00,9c,00,94,00,a1,00,98,00,a1,00,99,00,a2,00,98,00,a2,00,9a,00,a2,00,9a,00,a5,00,9c,00,94,00,9f,00,97,00,a3,00,9a,00,a3,00,99,00,a2,00,9a,00,a5,00,9a,00,a4,00,9c,00,95,00,a1,00,99,00,a3,00,99,00,a3,00,99,00,a3,00,9a,00,a2,00,9a,00,a4,00,9a,00,a5,00,9d,00,95,00,a0,00,98,00,a3,00,99,00,a3,00,9b,00,a3,00,97,00,a3,00,99,00,a4,00,9e,00,95,00,9f,00,97,00,a2,00,9a,00,a3,00,99,00,a4,00,9c,00,95,00,a1,00,98,00,a2,00,99,00,a3,00,9a,00,a4,00,9c,00,95,00,a0,00,97,00,a2,00,9b,00,a3,00,99,00,a2,00,9a,00,a6,00,9e,00,95,00,a0,00,97,00,a1,00,97,00,a2,00,97,00,a3,00,98,00,a3,00,9a,00,a4,00,9c,00,94,00,9f,00,98,00,a1,00,99,00,a4,00,9b,00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 3
    00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 0
    83,03,e8,00,a2,00,99,00,a2,00,99,00,a3,00,9a,00,a3,00,9b,00,a3,00,98,00,a3,00,99,00,a5,00,9d,00,95,00,9f,00,97,00,a2,00,9a,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a4,00,9b,00,a4,00,9c,00,94,00,a0,00,97,00,a0,00,99,00,a3,00,99,00,a3,00,99,00,a3,00,9a,00,a1,00,9a,00,a4,00,9d,00,95,00,9f,00,97,00,a1,00,9a,00,a3,00,99,00,a4,00,9b,00,a5,00,9d,00,95,00,a0,00,98,00,a0,00,99,00,a3,00,9a,00,a3,00,99,00,a3,00,9a,00,a5,00,9b,00,a3,00,97,00,a5,00,9b,00,a5,00,9c,00,94,00,9f,00,97,00,a0,00,9a,00,a4,00,9b,00,a4,00,9b,00,a4,00,9c,00,95,00,a0,00,97,00,a1,00,99,00,a3,00,99,00,a3,00,98,00,a2,00,97,00,a3,00,99,00,a2,00,99,00,a4,00,9a,00,a3,00,9a,00,a3,00,99,00,a5,00,9a,00,a5,00,9d,00,95,00,a1,00,98,00,a2,00,99,00,a3,00,99,00,a3,00,98,00,a3,00,9b,00,a5,00,9b,00,a3,00,9a,00,a1,00,9c,00,94,00,a0,00,95,00,a3,00,99,00,a3,00,9a,00,a2,00,9a,00,a2,00,9c,00,94,00,a0,00,95,00,a3,00,99,00,a3,00,9a,00,a3,00,99,00,a3,00,99,00,a3,00,9a,00,a5,00,9b,00,a4,00,9b,00,a4,00,9d,00,96,00,9f,00,98,00,a1,00,99,00,a3,00,9a,00,a4,00,9b,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a2,00,9a,00,a3,00,9a,00,a4,00,9b,00,a4,00,9c,00,94,00,a0,00,98,00,a1,00,98,00,a2,00,9a,00,a4,00,9a,00,a4,00,9b,00,a3,00,9c,00,94,00,9e,00,99,00,a2,00,99,00,a3,00,9a,00,a4,00,9d,00,96,00,a1,00,98,00,a3,00,9a,00,a3,00,99,00,a3,00,9a,00,a3,00,9a,00,a4,00,9b,00,a5,00,9d,00,95,00,a0,00,97,00,a2,00,9b,00,a4,00,9b,00,a5,00,9b,00,a5,00,9d,00,96,00,a0,00,98,00,a2,00,98,00,a3,00,9a,00,a2,00,9a,00,a4,00,9d,00,93,00,9f,00,98,00,a1,00,97,00,a3,00,98,00,a2,00,9a,00,a3,00,99,00,a1,00,9a,00,a3,00,99,00,a4,00,9b,00,a3,00,9a,00,a4,00,9d,00,95,00,a0,00,97,00,a2,00,97,00,a4,00,9a,00,a4,00,9b,00,a4,00,9d,00,95,00,a0,00,97,00,a2,00,96,00,a4,00,9a,00,a4,00,9b,00,a3,00,9a,00,a4,00,9c,00,93,00,9e,00,97,00,a1,00,9a,00,a3,00,99,00,a3,00,99,00,a4,00,9b,00,a4,00,9b,00,a2,00,9c,00,93,00,9f,00,98,00,a1,00,98,00,a3,00,99,00,a3,00,99,00,a2,00,99,00,a2,00,9a,00,a2,00,97,00,a1,00,9a,00,a3,00,99,00,a4,00,9a,00,a4,00,9c,00,95,00,9f,00,99,00,a2,00,9a,00,a2,00,99,00,a3,00,98,00,a3,00,99,00,a3,00,98,00,a3,00,9b,00,a4,00,9b,00,a4,00,9b,00,a4,00,9b,00,a5,00,9c,00,94,00,a0,00,99,00,a5,00,9b,00,a3,00,9a,00,a2,00,9a,00,a5,00,9d,00,94,00,a0,00,97,00,a1,00,98,00,a3,00,99,00,a3,00,97,00,a3,00,99,00,a2,00,9a,00,a3,00,9a,00,a3,00,9a,00,a3,00,98,00,a3,00,98,00,a2,00,9b,00,a3,00,99,00,a2,00,98,00,a3,00,99,00,a3,00,97,00,a2,00,9a,00,a3,00,9a,00,a4,00,9b,00,a3,00,99,00,a4,00,9b,00,a3,00,9b,00,a3,00,99,00,a0,00,9a,00,a4,00,9c,00,94,00,9f,00,97,00,a1,00,9a,00,a2,00,9a,00,a4,00,9b,00,a4,00,9d,00,95,00,a0,00,98,00,a1,00,9c,00,93,00,9e,00,96,00,a2,00,99,00,a4,00,9b,00,a5,00,9c,00,94,00,9f,00,98,00,a2,00,99,00,a3,00,99,00,a3,00,98,00,a3,00,9a,00,a4,00,99,00,a4,00,9c,00,95,00,9f,00,97,00,a2,00,98,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a2,00,99,00,a3,00,99,00,a3,00,99,00,a4,00,9b,00,a5,00,9b,00,a3,00,97,00,a5,00,9b,00,a4,00,9b,00,a4,00,9b,00,a4,00,9b,00,a5,00,9c,00,95,00,9f,00,98,00,a3,00,98,00,a3,00,99,00,a2,00,98,00,a3,00,99,00,a3,00,9a,00,a3,00,9b,00,a3,00,99,00,a3,00,99,00,a3,00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 3
    00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 0
    83,03,e8,00,94,00,9f,00,97,00,a4,00,9a,00,a4,00,9b,00,a3,00,9b,00,a4,00,9b,00,a4,00,9c,00,95,00,a1,00,99,00,a1,00,99,00,a2,00,99,00,a3,00,9a,00,a2,00,9b,00,a4,00,9c,00,92,00,9f,00,98,00,a1,00,9a,00,a3,00,99,00,a3,00,99,00,a4,00,9c,00,92,00,9f,00,97,00,a0,00,9a,00,a3,00,98,00,a1,00,98,00,a3,00,9b,00,a4,00,9b,00,a4,00,99,00,a6,00,9c,00,95,00,9f,00,97,00,a2,00,99,00,a3,00,99,00,a3,00,98,00,a2,00,99,00,a2,00,99,00,a3,00,99,00,a1,00,9a,00,a4,00,9b,00,a5,00,9b,00,a4,00,9d,00,96,00,a1,00,98,00,a0,00,9a,00,a3,00,9b,00,a0,00,9a,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a4,00,9b,00,a4,00,9b,00,a5,00,9c,00,95,00,a1,00,97,00,a3,00,9a,00,a3,00,99,00,a3,00,98,00,a3,00,9a,00,a4,00,9a,00,a4,00,9c,00,95,00,a1,00,97,00,a1,00,98,00,a3,00,9b,00,a3,00,9a,00,a3,00,99,00,a3,00,9a,00,a4,00,9c,00,95,00,a0,00,98,00,a2,00,99,00,a2,00,99,00,a1,00,9a,00,a5,00,9a,00,a4,00,9c,00,96,00,a1,00,99,00,a2,00,99,00,a2,00,99,00,a4,00,9b,00,a3,00,99,00,a3,00,9a,00,a3,00,9a,00,a3,00,99,00,a2,00,9a,00,a4,00,9b,00,a4,00,9b,00,a3,00,9c,00,94,00,a0,00,96,00,a2,00,99,00,a3,00,99,00,a3,00,9a,00,a2,00,9b,00,a3,00,98,00,a2,00,9a,00,a4,00,9c,00,92,00,9f,00,97,00,a1,00,99,00,a4,00,9a,00,a5,00,9d,00,96,00,a0,00,98,00,a2,00,9a,00,a3,00,9a,00,a2,00,9b,00,a3,00,99,00,a3,00,9a,00,a3,00,99,00,a3,00,9a,00,a3,00,99,00,a3,00,99,00,a3,00,9a,00,a5,00,9c,00,95,00,a1,00,97,00,a1,00,9a,00,a3,00,9a,00,a3,00,98,00,a3,00,9a,00,a4,00,9c,00,94,00,a0,00,95,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a3,00,9a,00,a4,00,9b,00,a4,00,9c,00,96,00,a1,00,98,00,a1,00,99,00,a5,00,9b,00,a4,00,9c,00,95,00,9f,00,98,00,a2,00,99,00,a4,00,99,00,a4,00,9b,00,a4,00,9c,00,94,00,a0,00,96,00,a3,00,9a,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a3,00,99,00,a4,00,9b,00,a5,00,9d,00,95,00,a0,00,99,00,a1,00,99,00,a3,00,9a,00,a3,00,9a,00,a4,00,9b,00,a4,00,9c,00,94,00,a0,00,98,00,a1,00,99,00,a4,00,9b,00,a2,00,9a,00,a3,00,99,00,a3,00,99,00,a2,00,9a,00,a3,00,9b,00,a4,00,9b,00,a3,00,99,00,a4,00,9b,00,a5,00,9b,00,a4,00,9c,00,94,00,a1,00,97,00,a1,00,98,00,a3,00,9a,00,a3,00,9a,00,a3,00,99,00,a4,00,9b,00,a5,00,9c,00,96,00,9f,00,97,00,a2,00,9a,00,a3,00,9a,00,a3,00,98,00,a3,00,9a,00,a4,00,9b,00,a2,00,9b,00,a4,00,9c,00,95,00,a0,00,97,00,a3,00,99,00,a3,00,99,00,a4,00,9a,00,a4,00,9c,00,95,00,a1,00,99,00,a2,00,99,00,a3,00,9a,00,a3,00,9a,00,a3,00,9a,00,a3,00,9b,00,a5,00,9a,00,a4,00,9b,00,a4,00,9d,00,97,00,a0,00,97,00,a3,00,99,00,a4,00,9c,00,93,00,9f,00,97,00,a1,00,99,00,a3,00,9a,00,a4,00,9b,00,a3,00,9a,00,a4,00,9b,00,a3,00,99,00,a3,00,9b,00,a2,00,9a,00,a3,00,9a,00,a4,00,9c,00,95,00,a0,00,97,00,a2,00,99,00,a5,00,9b,00,a4,00,9a,00,a4,00,9b,00,a4,00,9c,00,94,00,a1,00,98,00,a1,00,99,00,a3,00,99,00,a3,00,99,00,a5,00,9c,00,94,00,a1,00,97,00,a2,00,97,00,a4,00,9b,00,a4,00,9c,00,95,00,9f,00,98,00,a3,00,98,00,a2,00,99,00,a3,00,9b,00,a3,00,99,00,a2,00,99,00,a3,00,9a,00,a4,00,9b,00,a4,00,9b,00,a3,00,9a,00,a5,00,9b,00,a2,00,9b,00,a4,00,9a,00,a6,00,9c,00,95,00,9e,00,98,00,a3,00,99,00,a3,00,99,00,a4,00,9c,00,96,00,a1,00,96,00,a3,00,99,00,a4,00,99,00,a4,00,9c,00,93,00,9f,00,97,00,a3,00
    pi@raspberrypi:~/development/xae1000$

     

     

    I don't believe it is related to the ADC, because with the modification, it should overwrite whatever the ADC sends. With the mod, I see this output:

    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 3
    00
    pi@raspberrypi:~/development/xae1000$ ./xmos_adc 0
    83,03,e8,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55
    pi@raspberrypi:~/development/xae1000$

     

    Just to clarify, when you build the code, could you try this:

    First, confirm the code that is intended to be compiled is selected, i.e. close all projects, and right-click on your project folder (whatever it is called) and select "set as current project" so that it becomes bold font text.

    image

    Next, click the drop-down arrow next to the hammer icon (for building the code) and select 'Release' so that it is checked.

    After the code has been built, when you go to Run->Run Configurations, ensure that the Release code is selected (this is just so that we're both compiling and running the code in the same way - it shouldn't have an effect hopefully).

     

    I've tried this on the RPI B+ (previously I did this on the RPI B) - however it looks like the RPI portion of the code is behaving since you got 0xff when you pulled the particular SPI line high earlier.

     

    I've also tried it on two StartKITs just now (the first one I had was a pre-production model, but the second one was purchased from Farnell) and they both output content similar to the above output. The photo below shows the topology, but it sounds like your topology is similar. For the connections, I followed the diagram as above.

     

    image

    image

     

    I must admit, I'm quite stumped : ( Anything you can spot from the photo that may be different? The fact that you see 'incoming SPI' when you uncomment that means the MOSI line is correct. The MISO may be disconnected but I think you proved your jumper cable is fine when you connected it to +3.3V.

    I can't think what else could be causing this : (

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to shabaz

    Thanks Shabaz.  I did a clean project build, under 'release' rather than 'debug', and I'm now getting much better results (didn't change anything else).  Can that really be the cause?


    I still have the debug printf's and the 0x55 / 0xaa tweaks in, I now see


    So looks like the MISO line is now working properly.

     

    pi@raspberrypi ~/development/xmos $ ./xmos_adc 0
    cmd is 0
    aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

     

    If I issue cmd 3, then cmd 0, I see a full buffer of aa / 55 as follows

     

     

    pi@raspberrypi ~/development/xmos $ ./xmos_adc 3
    cmd is 3
    00
    pi@raspberrypi ~/development/xmos $ ./xmos_adc 0
    cmd is 0
    83,03,e8,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55,aa,55

     

    Will now try the full scope javascript app ..!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 10 years ago in reply to Former Member

    Hi Steve,

     

    That's excellent! You may want to comment back out the printf commands, so that the app can run fast. By the way I noticed later on that I was using a particular javascript function wrong, the code still works, but can be improved. Anyway, better to try with the code as-is for now, so you get similar results for now.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to Former Member

    .. and the scope is now fully working.

    I found that the debug 'printfs' I had were causing some strange result where the buffer jumped to zero after a while (screenshot 1 in the attached).

    But once I took this out, the scope ran much better (shot 2 attached).

     

     

    Thanks for your support!image

     

    image

    Next step, is I really just wanted the SPI comms part of this ;-)  I want to check how fast the communication over the wires I have can actually run, so I'll make a new project that sends hex values between the pi and the StartKit, checking for any corruption etc.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 10 years ago in reply to Former Member

    Hi Steve,

    That's great!

    I'm not sure why it didn't work in debug mode, I'm not super-familiar with the IDE (I know enough to get by, but no more) but glad it is all sorted.

    Good luck with your project!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • shabaz
    shabaz over 10 years ago in reply to Former Member

    Hi Steve,

    That's great!

    I'm not sure why it didn't work in debug mode, I'm not super-familiar with the IDE (I know enough to get by, but no more) but glad it is all sorted.

    Good luck with your project!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube