PICP (Linux PICSTART Plus) for 16F883 and 16F886

July 30th, 2010 by wd5gnr

Just in case you want to use PICP with either the 16F883 or 16F886, add this to your picdevrc file:

[16F883]
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
PICSTART

[16F883:def]
10 00 3f ff 3f ff 00 7f
00 7f 3f ff 3f ff 00 ff
00 ff 00 00 00 00 00 00
0D 10 20 00 04 20 07 02
00 00 01 00 00 00 00 00
00 01 22 0f

[16F883:defx]
3f ff 07 00 00 00 00 00
00 00 00 00 00 00 00 00
3f ff 07 00 00 00 00 00
00 00 00 00 00 00 00 00

[16F886]
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
PICSTART

[16F886:def]
20 00 3f ff 3f ff 00 7f
00 7f 3f ff 3f ff 00 ff
00 ff 00 00 00 00 00 00
0D 10 20 00 04 20 07 02
00 00 01 00 00 00 00 00
00 01 22 0f

[16F886:defx]
3f ff 07 00 00 00 00 00
00 00 00 00 00 00 00 00
3f ff 07 00 00 00 00 00
00 00 00 00 00 00 00 00

Add This! BlogLines del.icio.us Digg Diigo DZone Facebook Google Google Reader Yahoo! MyWeb Netscape Netvouz reddit SlashDot Sphere StumbleUpon Technorati

Cost Effective Digital I/O for LabView

June 7th, 2010 by wd5gnr

Example GP3 VI

LabView is great software, but it isn’t easy to find inexpensive hardware that works with it. Since the GP-3 is a serial device (RS232 or USB) LabView can use it, but it does take a bit of hoop jumping to match the GP-3’s efficient binary protocol with LabView’s string-oriented I/O.

Because so many people have asked me about how to use LabView with the GP-3, I’ve started posting blocks that do the GP-3 functions. I don’t have them all yet, but I’m steadily adding to them, and the example they provide would make it pretty easy to do any of them you want (in fact, I just copy, paste, and modify to get most of them myself).

Read the whole article at http://www.awce.com/gp3-labview.htm and look for the download files at the bottom.

Add This! BlogLines del.icio.us Digg Diigo DZone Facebook Google Google Reader Yahoo! MyWeb Netscape Netvouz reddit SlashDot Sphere StumbleUpon Technorati

New GP-3X Boards Available

May 30th, 2010 by wd5gnr

Here’s a chance to pick one up at a promotional auction price.

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=230481553652

The firmware on these boards is the normal GP-3. You can use it as a PC A/D interface for data acquisition or control You can also create a program with GP3EZ and then “download” it to the board so the board will function without a PC.

The differences in this board from the regular board:

1) All I/O is out to the edge and marked. Screw terminals are optional (included in the auction).

2) Dedicated jumper for GP3EZ run/program mode

3) USB daughterboard available

4) Room for a “regular” LED or a 2nd 5V LED.

5) Large ground lands for the analog converters to decrease noise pickup

6) Spare area for op-amps or other devices (if not using USB daughterboard); flexible I/O lets you “interrupt” the analog and digital I/O to reroute.

7) Slot for resonator OR crystal.

8 ) Switchable DTE or DCE serial port (and connections for TTL serial)

There is also a new manual for ALL GP-3s. Unlike the old “two part” manual, this is one manual for all GP-3 boards and should not require any other manual regardless of which kit you have. http://www.awce.com/gp3.pdf

Add This! BlogLines del.icio.us Digg Diigo DZone Facebook Google Google Reader Yahoo! MyWeb Netscape Netvouz reddit SlashDot Sphere StumbleUpon Technorati

SuperProbe

May 29th, 2010 by wd5gnr
.!.

We have a group of hams that homebrew that meets once a month for breakfast. A while back I noticed the SuperProbe and thought it would be a good way to get some of the guys started with Microchip PICs.

I started out breadboarding the circuit, but they will eventually go into nice cases we bought from Kelvin.

Here it is in logic probe mode, reading a logic 1 (High):

Breadboarded Super Probe reads a logic high

And here it is reading a voltage (just an output from a pot):

The Super Probe reads a voltage

I want to make a few modifications — at least a buzzer (shared on the switch lines) and maybe something with the serial port, but I wanted to “base line” it first.

Stay tuned.

Update. Here’s a video of the above in action:

And I have in fact built this in a nice case (finally). Here’s some pictures:

Probe Exterior

Probe (outside view with red bezel removed)

Inside view of the probe

Inside view of the probe

Add This! BlogLines del.icio.us Digg Diigo DZone Facebook Google Google Reader Yahoo! MyWeb Netscape Netvouz reddit SlashDot Sphere StumbleUpon Technorati

Emacs, Chrome, and Daemons

May 15th, 2010 by wd5gnr

I  really liked the Chrome extension that lets you edit multiline text edits in Chrome with emacs (or, I guess any other editor — as though there are any other editors). However, it has to have a server running. You can run a python server or one in e-lisp. But the lisp one requires emacs to be running already.

Here’s how I set mine up.

1) Autostart emacs –daemon using your choice of methods (autostart, Xsession, whatever)

2) In your .emacs you need this:

(if (and (daemonp) (locate-library "edit-server"))
(progn
(require 'edit-server)
; can add options here like (setq edit-server-new-frame-mode-line t) (setq edit-server-new-frame-minibuffer t)
(edit-server-start)))
3) Then in your .bashrc put this:
if [ -z "$DISPLAY" ]
then
  alias emacs='emacsclient -t'
  export EDITOR='emacsclient -t'
else
   alias emacs='emacsclient -c -n'
   export EDITOR='emacsclient -c -n'
fi
Works great. Of course, you need to start the daemon manually THIS TIME (and execute the script lines) or log out and log back on for this to work.

By the way, once you set up the alias, you can’t easily restart the emacs daemon. Remember you can override an alias with quotes: ‘emacs’ –daemon

Update: you can set ALTERNATE_EDITOR in your environment to the empty string and emacsclient will start a daemon if one is not running. So that means you could skip step 1 if you add:

export ALTERNATE_EDITOR=""

to step 3. This is nice because if you kill the server (to reload your .emacs, for example) or it dies (unlikely) then things till work without the user having to reload the daemon manually. Of course, you can still keep step 1 as well which makes your initial load a little faster, and still protects you against a dead daemon.

Add This! BlogLines del.icio.us Digg Diigo DZone Facebook Google Google Reader Yahoo! MyWeb Netscape Netvouz reddit SlashDot Sphere StumbleUpon Technorati

Upgrade to Ubuntu (Kbuntu) 10.04 Fails

April 30th, 2010 by wd5gnr

Like an idiot I always upgrade stuff. Can’t help it. I know better. Really. I do.

I ran the install and got an error that apt’s post install script failed. Then it kept going for some time. And then it decided it had failed and my system was in an unstable state. Have a nice day.

I could still boot to the old kernel (the new kernel worked but the system was too trashed to rebuild the Nvidia drivers).

Turns out in /var/lib/dpkg/info/apt.postinst there is a function called:

set_apt_proxy_from_gconf

What’s more is down a ways in the script it calls this line and that is what makes it fail. Three hash signs later and the system is happily configuring away!

Hope that is useful info for you.

Add This! BlogLines del.icio.us Digg Diigo DZone Facebook Google Google Reader Yahoo! MyWeb Netscape Netvouz reddit SlashDot Sphere StumbleUpon Technorati

Rigol DS1052E or DS1102E Linux Software (link)

April 28th, 2010 by wd5gnr

I haven’t tried it yet, but http://www.cibomahto.com/2010/04/controlling-a-rigol-oscilloscope-using-linux-and-python/ has a simple Python object and a demo that lets you access the Rigol scopes via the usbtmc interface. Looks cool.

Add This! BlogLines del.icio.us Digg Diigo DZone Facebook Google Google Reader Yahoo! MyWeb Netscape Netvouz reddit SlashDot Sphere StumbleUpon Technorati

Rigol DS1052E and DS1102E Delayed Trigger

April 26th, 2010 by wd5gnr
Delayed Sweep "zooms in" on part of a displayed waveform

Delayed Sweep "zooms in" on part of a displayed waveform

I have an old Tek scope. A great 50MHz analog beast that was surely the envy of every engineer — well every engineer in 1976 anyway.

Of course, its a Tek so it is built like a tank and has the usual great features — for a 1976-vintage analog scope. One thing it has that is very cool is “delayed sweep.” The idea is that the scope will trigger as normal and then you can pick a fixed time delay and a different time base to actually drive the display. Huh? All that means is that while watching a regular wave form you can “zoom” in on a section of it. The delay tells you how far into the original screen to start, and the faster sweep gives you the zoom factor. The user interface for this is comical but effective. The scope has a special mode where the time delay and “zoomed” time base makes the trace very bright. So you twist the knobs until the part you want to zoom in on is bright and then you can zoom in.

The Rigol DS1102E (or is it a DS1052E? I forget) has the same capability, but being digital it is very simple and the user interface is much more effective. See the screen shot? The top trace shows a 32kHz PWM signal (about 4%) generated, of course, from a GP3. The bottom trace is the “zoom in” — you can pick delayed sweep from the menus or if you are lazy just click the horizontal scale knob (did you know if you press and hold any button you’ll get help — unless you’ve uploaded unofficial firmware).

Once you turn on delayed sweep you get blue bars on the top that show you the part of the wave you are zooming. You can move the trace with the horizontal position knob and change the zoom level using the horizontal scale. Note that the main window (top trace) is at 10uS/division (you can read that near the bottom of the screen). But the zoomed in part is 500nS/division (right under the enlarged pulse).

When you have seen enough, just click the horizontal scale knob again and you are back to “undelayed trigger” or whatever you want to call it. This can be really handy when you are navigating a long buffer. The top view shows you where points of interest in the buffer are, but the bottom view shows you the detail you want.

What would all of this been worth in 1976? My Tek retailed for about US$2500 in its day. Amazing.

Add This! BlogLines del.icio.us Digg Diigo DZone Facebook Google Google Reader Yahoo! MyWeb Netscape Netvouz reddit SlashDot Sphere StumbleUpon Technorati

Analog Chart Recorder in Shell Script

April 25th, 2010 by wd5gnr

GNU Plot streams data

GNU Plot streaming GP3 data "live"

Linux has a long history of stringing together data and processing to get new features. With the GP-3 interface board analog and digital “real world” data just become another piece of data to process using the Linux tools.

This article shows you how to string together a GP-3, some fancy shell script, a Perl script found on the Internet, and GNU Plot to make a data recorder that is flexible without writing any actual code.

GP3 Videos and a New Board On its Way

April 23rd, 2010 by wd5gnr

If you’ve been reading my posts about the Rigol scope you’ve probably noticed I use the GP-3 board to generate odd test signals. We have made these for a long time and they are in the most amazing number of things all over the world. But over the years we’ve heard customers ask for new or different options and we’ve thought of a few things ourselves. So within the next month there will be a new PCB option for the GP-3. The new board will have the option to be easily wired for RS232, USB, or both. It also has provisions for “regular” LEDs, screw terminals that can double as feet, and all signals brought out to the terminals. A dedicated jumper lets you set the GP3EZ program status, an improved reset switch, and provisions for a resonator or a crystal are just some of the new features you can expect.

These new boards will be even better for tough industrial applications and have a quieter A/D layout than the old boards. But the older boards will still be available. They cost less, are easier to work with on a solderless breadboard, and they are much smaller so they squeeze into tight spots better. But choice is good, right?

If you want to watch some videos about the GP3:

Oh and by the way. We’ve always supported Linux with a variety of libraries. But the GP3EZ software now runs under Linux too. If you haven’t seen GP3EZ, check out the videos.

Add This! BlogLines del.icio.us Digg Diigo DZone Facebook Google Google Reader Yahoo! MyWeb Netscape Netvouz reddit SlashDot Sphere StumbleUpon Technorati

« Previous Entries