Sunday, February 28, 2016

,

Beaglebone Black and PRU-ICSS IO dump tool

Some time ago I said that I'll start working on a new project, a digital analyzer on Beaglebone Black. I had a lot of ideas but when I saw that there already is another project that does all the things that I wanted, I abandoned mine. Why? Because I didn't want to reinvent the wheel.

So, I decided to make some tests with Beaglebone IOs, and I wrote a Linux driver and made what I called gpiodump . It was just a tool for dumping the data that is received on IOs and print it in VCD( Value change dump) format. But it was slow, so the tool only existed for almost 2 weeks. And I started to write code on PRU-ICSS ( Programmable Real-Time Unit Subsystem and Industrial CommunicationSubSystem).

It was interesting and now, the tool that I have for dumping IOs works in real-time.

So, it'll be released soon and maintained.

Check out the code here!

Soon a dedicated page will be posted on http://23ars.github.io .

Sunday, January 10, 2016

, , ,

SignalsViewer -> New Project

It's quite a lot since I wrote the last article on this blog. I didn't have time cause I had a lot of projects to do. I only managed to create a first release for eOS ( remember? The real time operating system that I wrote.) and that's all. And I also didn't have ideas!

But, this weeks I thought that I should implement an old idea. I often need at home a digital analyzer but I didn't bought one. I tried to make one with my Raspberry Pi, but I failed ( I couldn't do it like I wanted because I couldn't establish a proper communication between the Pi and PC to send data). Now, I thought that I should try with my newest devboard, Beaglebone Black.

So, how I'll make it? I thought that I should implement on Beaglebone a server that will receive some commands and take a proper decision. So, I started to write a server, I wrote some documentation for frames that will be exchanged between server and client, also some documentation for the supported commands and I implemented them. Also, for debugging the server I wrote a client on Windows.

The idea is that one client will be connected to the server that will be running on Beaglebone and will send some commands. For example, it'll tell to server to start logging a IO pin when a rising edge is detected. All data that will be logged will be send in frames to the client and it'll be displayed. Like a digital analyzer. Now, the big idea is that the client will be also implemented for Android devices, so one that will want to see the signals on specific IO pins will can use he's tablet or smartphone  for that. Also I'll add some features like logging SPI, I2C, UART etc interfaces.

Even if it sounds simple it's quite a lot to work. In two days I only wrote the server and implemented the frame format on Beaglebone and I made some UI in C# for client. But I hope that I'll can properly manage my time, the software development iterations ( each step is documented in a issue, and steps are grouped in some milestones) and maybe in 2-3 months I'll have a digital analyzer with some basic features.

About the technologies/ programming languages that I use, for the server part I use C. The server will be running in a Linux environment, so I thought that the best choice is C. Also, maybe I'll use some assembly to run some code on the 2 PRU microcontrollers from Beaglebone but I'm not sure. For now, I don't know if I'll use assembly or I'll write a Linux device driver for GPIO. For the Windows Client, I choose C# as the programming language and DevExpress for UI and for the Android Client, of course, Java. So 3 programming languages, languages that I know, of course, but a lot of work.

I'll try to weekly write an article about this project just to present the steps that I made, what I learned from this project ( I'm sure that is a lot to learn). Also, the source code and some documentation can be found in the REPO.

And now, a preview of what will be the SignalsViewer Client that will run on Windows. ( It's strange that I didn't thought to write a Linux client but it's not late.)


Sunday, October 4, 2015

FileCompare, a tool in C#

FileCompare was an idea of project to learn to use DevExpress. And also to learn C#, even though I used it before.

So, the idea of this project came when I was thinking for a project in which to use DevExpress. I wanted to create something with GUI but I didn't know what, until I needed to compare 2 files. OK, I should recognize that even now after I wrote a compare tool and I made a pre-release, I don't use it. For now, it's not enough for me. And I think that is also not enough for everyday use, but it's a good example of how to use some elements, it's good for learning and so on.

For future development, I have a few ideas, I know how to make it more professional, but I didn't want to wait with the article for that moment. So, a simple screen shoot of how it looks:

And source code:
HERE

Monday, September 28, 2015

,

First tool from rtools collection is almost done

rtools will be a collection of applications that will allow to control GPIOs, I2C, SPI etc. on Raspberry PI. The idea of this tools came when I had to debug some code on a devboard, and without an oscilloscope, it was really hard.

What I want? To create a collection of tools that will allow me to control other devboards or read from them with Raspi. For example, if I want to log some signals on digital output, I could connect the output to a GPIO and read all the transitions of the signals. Now, the first tool from the collection, gpiodump almost do that. It's not done yet, but it can read and log what it reads.

Check out the code >> HERE.

Sunday, September 20, 2015

,

A new small app born from a testing code

Today I started working on a tool that will run on Linux, for my Raspberry Pi and while I was making some tests with a piece of code, I figure out that I can make something useful from it.

So, short story! For example, on raspi I work only from command line and with nano editor. That's OK and I like it ( I'm a big fan of shell and terminal) but it can be a pain when you want to search for a word in some files. For example, let's suppose that you have a tree of directories and files and you want to find all the references of a phrase in the files from that directory. Hmmm, what you'll do?

OK, with some bash script or some fancy and hard to remember commands you can accomplish that task. But, if you don't remember the commands or you don't have a bash script for such a task, you'll search on Internet for something that can do what you'll want. After, let's say an hour, you'll give up and start scripting. And another hour of scripting and testing, and again scripting and testing and so on...

It's not so fast, and I must say that what I said, it happened to me! For example I searched for some commands to replace some strings in a file, and I found something  with sed command. I remembered that I used sometime but could not remember how. So, I started reading the man page of the command, to create and tests command, obviously I had to try and modify the command a couple of times and finally I managed to accomplish the task. But it wasn't fast.

Back to the subject of the article, from a piece of code for testing I created a small app that will search for all references of a keyword/phrase etc in all files from a directory or a directory tree and display the output in terminal or in a file.

The command is simple:

./search -d /home/mihai -w test -r n

This tells the app to search in directory /home/mihai for the word test and to not consider the directory as a directory tree ( to not perform a recursive search).

./search -w test -r n

will search only in the working directory for a word, recursively or not.

So, let me show some screenshots:

Results of searching for word test

Command line arguments that the app knows, for now
You can see the code HERE. Also, I must say that initially this was a test code, so, don't judge the style and the fact that maybe it's not so easy readable.
Loading...
Powered by Blogger.

About Me

My Photo

I'm just a blogger and a future hardware engineer. 
From the point of view of known programming languages, I know C/C++, Assembly NASM,VHDL and Java and I'm planning to work in embedded development.

About my hobbies, I like/ liked ( because I don't have enough time anymore) history, reading, cycling and learning a lot of new things in programming.
My mottos are:
"Laziness leads to progress!" and "A morning with a cup of coffee, cigarettes and programming is a good morning!" and I think that they said a lot...

Follow on facebook