• Content count

  • Joined

  • Last visited

  • Days Won


Kristoff last won the day on February 1

Kristoff had the most liked content!

1 Follower

About Kristoff

  • Rank
    Prolific Poster

Profile Information

  • Gender
  • Location
    Seattle, WA
  1. Google Analytics

    @D@n is spot on. -Kristoff
  2. OpenScopeMZ upload failed

    Hey Jiandan, If you're using the OpenScope MZ with WaveForms live you will never need to program it using the Arduino IDE, MPLAB or the PICkit3. All firmware updates should be done through the WaveForms Live software. WaveForms Live is available offline as well and is built into the Digilent Agent (see details in the FAQ under Is WaveForms Live available offline). WaveForms live uses the Digilent Agent to load firmware onto the OpenScope MZ at the 1250000 baud rate, so the baud rate is not the issue if you're able to do that successfully. It sounds like the hex file generated by the Arduino IDE is not generated correctly and does not work. -Kristoff
  3. Hey Jiandan, Can you please provide as much information as possible? There are a million things that could go wrong like accidentally building the firmware for the wrong target, bugs in your application that could prevent the expected behavior, etc. One thing to note is that the hex file produced by the Arduino IDE does not include the bootloader so programming it to the OpenScope with a PICkit 3 will likely override the bootloader. -Kristoff
  4. Openscope discovery question

    Glad to hear you were able to get to the bottom of it. Thanks for following up with Sigrok. I'm sure this will save other people time in the future. -Kristoff
  5. OpenScopeMZ upload failed

    Hey Jiandan, Are you able to upload firmware to the OpenScope MZ using WaveForms Live? Thanks! -Kristoff
  6. Checksum failed when upload

    Before the hex file is programmed to the microcontroller the file is checked for errors using a checksum. It looks like that checksum did not pass, so the firmware was not programmed on to the microcontroller. This is may be a problem with the Arduino IDE configuration. It is extreemly unlikely that the firmware update would cause the microcontroller to stop working and if it does you could re-flash the bootloader image using a PICKIT3 (much easier than soldering a new chip on the board -Kristoff
  7. OpenScopeMZ upload failed

    Hey, We did a lot of testing with the 1250000 baud rate because we were concerned that some USB ports might have problems. We've described a known issue cause by this baud rate, but it only affects USB 2.0 'Full Speed' ports (remember USB 'High Speed' is faster than 'Full Speed)', and only when transfering large buffers of data. We have never found this baud rate the be an issue during firmware loading since it uses many small data packets. Can you provide more details about your system and the USB port you're using? Have you tried other ports on the same computer and other computers? Thanks! -Kristoff
  8. Hey, This blog post has an overview of the 'stretch goal' features and links to more info. Let us know if you have any questions as you get started with the data logger. Thanks! -Kristoff
  9. PinOut OpenScope MZ Arduino

    Hey Miguel, The OpenScope is programmable from the Arduino IDE, but it does not implement the full Arduino API (the Arduino functions like digitalRead(), digitalWrite(), etc). Most Arduino functions are designed to be very easy to use and are not very efficient. Our OpenScope MZ firmware pushes the PICMZ to the limits and Arduino style functions were not nearly performant enough to develop our firmware. If you want to write custom firmware for the OpenScope MZ you'll need to develop an understanding of the PICMZ architecture and how to read and write registers to control the various peripherals. The OpenScope MZ firmware is a great example of this approach. -Kristoff
  10. Hey João, We've been working with some Bluetooth modules for other products lines (pmods and system boards). If all goes well this could be something we bring to the instrumentation line in the future, but we don't have any immediate plans to create an OpenScope variant with Bluetooth. -Kristoff
  11. Openscope discovery question

    Hmm, that looks correct to me. Here is my configuration: I'm using PulseView 0.5.0-git-a98be2
  12. We don't use the Arduino IDE for development. We use MPLABX. The MPLABX project setup varies depending on what you want to do, but you should be able to create a new project, target the correct PICMZ, import the source code and build it. You'll also need to setup a programmer / debugger and any other supporting resources you decide to use. Since this setup is pretty open ended we decided to leave it up to users to choose how to setup their environment based on their specific requirements. -Kristoff
  13. Hey Paul, The Digilent Agent doesn't automatically run on Linux. You should by able to launch it from the terminal with the following command (sudo is only required for access to the serial hardware): sudo digilent-agent You'll need to do this each time you reboot to start the agent, or setup a CRON job or similar to automate it. Let us know if you have any questions about this. Thanks! -Kristoff
  14. Counting '{' and '}' is exactly how I did this in the serial library for the Digilent Agent. The Agent needs to pass UART data from the hardware to WFL as the response to an HTTP request. The Agent doesn't need to interpret the data but without some processing it can't tell when the data packet is complete, so to avoid waiting for a long (500 ms+) timeout and adding 500+ ms latency to every request the Agent does some basic interpretation. It looks at the first byte and if it is a '{' it assumes the packet is a JSON object. If so it starts incrementing a count when it sees a '{' and decremented when it sees a '}'. When it gets to zero the JSON object is complete and the Agent assumes the entire packet is complete so it returns it to WFL. Note: This isn't safe for general JSON. JSON objects could contain strings which could contain '{' or '}' characters. To be safe for general JSON you should keep track of a 'state' to indicate if you're in a string or not. If you are inside string you need to ignore '{' and '}' characters. No DIP commands contain strings with '{' or '}' but it is possible that some user defined parameters (wifi network name) could contain those characters. TBH that scenario was added after this part of the Agent and is something we should fix. Added a github issue here. if(resp[0] == '{') { //---------- JSON ---------- qDebug() <<"Incoming Data Looks Like JSON"; int openBracketCount = 0; //Process initial data for(int i=0; i< resp.length(); i++) { if(resp[i] == '{') { openBracketCount++; } else if(resp[i] == '}') { openBracketCount--; } if(openBracketCount <= 0) { qDebug() << "Serial::fastWriteRead()" << "thread: " << QThread::currentThread() << "Found the end in " << stopWatch.elapsed() << "- Response:" << resp; emit fastWriteReadResponse(resp); mutex.unlock(); return resp; } }
  15. The JSON parser ended up being much larger than we expected When the OpenScope MZ boots it defaults to 'menu mode' (the interactive menu through the serial terminal). While in this mode JSON commands are ignored, however we needed a way to programatically get from this mode into JSON mode so WFL can start talking to the hardware. The 'Enter JSON mode' command ({"mode":"JSON"}\r\n) is a special command that isn't really part of the Digilent Instrumentation Protocol proper. It is a special command that is not handled by the DIP parser and is used to activate 'JSON mode' (ie the DIP parser). I'll have Keith confirm this, but if I recall correctly menu mode looks for the /r/n to process user inputs, which is why the /r/n was required on the 'Enter JSON mode' command, but not for any of the other commands. The 'Command Format' section in the DIP specification says: Let us know if you have any questions about this. I'd also love to hear more about what you're working on. Thanks! -Kristoff