OESF Portables Forum
General Forums => General Discussion => Topic started by: omega on August 16, 2004, 04:38:34 am
-
Hi,
I am thinking of doing a project based around a PIC 16F877 microcontroller. This chip has a 8 channel 10 bit ADC, runs @ 20Mhz and has a UART. It will basically be an advanced multimeter with several interesting functions depending on my time.
I intend to make a serial programmer for it, and to program it using my Z. As a portable device i will be using a LCD with it.
My next step would be to implement a software based solution on the Z and communicating with the microcontroller via the serial port. This would allow me to have all the data displayed on the Z and also to perhaps implement a oscilloscope. The data could then be logged and exported as necessary.
I would ideally design the software so that it would run on a PC with little / no modifications.
Does anyone have any pointers relating to any of this? I would like to find some data / programs that take data from the serial port on the Z. I also would especially like to find some guides on programming the 16F877 as i have never handled pics before, but i'm starting.
-
Hi,
Can someone please see if this relates to the above post? I see PIC & Zaurus, but the translations on the web are terrible
http://www.geocities.co.jp/Technopolis/385...urus/zau008.htm (http://www.geocities.co.jp/Technopolis/3850/zaurus/zau008.htm)
-
never mind, it's about a palm keyboard to a z conversion... might use someday.
have my pic16f877 running, reading an adc and doing so i/o. Now i have to work on my assembly skills to make something useful with it.
-
I've used the 16F877 before, nice microcontroller.
I program mine in C and use the CCS compiler (they have linux and dos versions available). My compiler is like 4 years old and Im running the old dos verison under dosemu (runs and compiles fine).
There is a linux package called "odyssey" (do a google search for "pic odyssey") which can be used to program various different pics from linux via parallel port programmer. Unfortunately I havent got this working yet, in windows the parallel port runs 13.7V, in linux, only 7.2V.
Never thought about using the PIC to do either job though. Let us know how it goes.
-T
-
Tyris parallel port is only TTL, how could you get 13.7? Or you mean the signal from the parallel port only gives you a lower voltage than necessary from the PIC?
Apparently the PIC F877 can be programmed with only 5v, once you set the appropriate flag during high-volt (13) programming. I agree, it is a very nice microcontroller!
I thought you had to buy the CCS compiler? I've started to use JAL (Just Another Language) , and JALss has a built in circuit simulator so that's very handy. I think there is also a linux version of that, so i may be looking for someone to help me compile for x/qt! 8-) JAL also seems to be nice, because if there are any limitations in the language, or of my understanding you can use the assembler directive and start to write assembly in the middle of the code.
I intend to build a serial port programmer for the Zaurus. Someone told me on another of my posts that the serial port is only TTL - if this is the case, it's perfect and i don't have to do logic level translations to true RS232.
I need to learn more assembly, but it's going well. Have digital i/o working and also reading a A/D port - i just have to work out the middle parts to get it to do something interesting!
-
Not that I have much experience with PICs, but have you seen this:
http://www.killefiz.de/zaurus/showdetail.php?app=721 (http://www.killefiz.de/zaurus/showdetail.php?app=721)
and this:
http://www.killefiz.de/zaurus/showdetail.php?app=720 (http://www.killefiz.de/zaurus/showdetail.php?app=720) ?
Both are GPLed
-
I'm just laughing. Excellent, thanks tumnus. I googled looking for pic and zaurus and didn't find anything useful.
I'm intending to develop a pc link for this project as well (which should be simple in terms of components, and I will be publishing the schematic somewhere), I'm just wondering something that maybe the experience of you all can help... What language should i develop the PC display application in? I would ideally like to be able to compile and run it on both the Z and PC (windows) with same code [obviously different compiler]. Does anyone have a suggestion?
The program requirements will be a graph and some dialog boxes with numbers and a few options, so nothing pretty fantastic. The big issue though is that they will have to be able to access the serial port on both machines. Can this be done in java on either / both platforms. Thanks for the help!
-
Tyris parallel port is only TTL, how could you get 13.7? Or you mean the signal from the parallel port only gives you a lower voltage than necessary from the PIC?
I thought you had to buy the CCS compiler?
I intend to build a serial port programmer for the Zaurus. Someone told me on another of my posts that the serial port is only TTL - if this is the case, it's perfect and i don't have to do logic level translations to true RS232.
I think my memory may be fuzzy, it could have been 12.7V on my work laptop using windows.
Unfortunately running Odyssey on my linux server I only got 7.2V out of it -- which was not enough to progarm the PIC. Note that I measured the voltage at the programming pin of the pic itself, not the parallel port directly. I am using the EPIC PIC programmer which runs great in windows. I still have not root caused this problem under linux. I cant really do a clean comparison between linux/windows on the same machine as none of my computers dual-boot.
Yes, I bought CCS's PCW years ago, so I've got a relatively stale copy, but it works well for 16F877s. I've been very happy with it as it supported all of the native functions of the PIC, in addition to supporting lots of internal routines and supporting LCDs etc. The manual which came with it was superb. I'll probably get their compiler specific for PIC18 series, as I dont think the 16 series has enough ram to be able to write to compact flash cards (need 512 bytes for a sector), but I may be able to pad it with zeros or figure something out.
Please keep us informed on how your serial programmer effort goes. I'd love to be able to ditch the windows machine needed to program the PIC.
-T
-
I've started a 16F873 based voltmeter :
http://ombrepixel.com/drobert/electronic.html.en (http://ombrepixel.com/drobert/electronic.html.en)
It was just to learn the micro and the LCD, I'm not sure that using the pic internal
ADC is accurate enought.
But I think about using my Zaurus (SL5500) as a digital oscilloscope. Some projets use the soundcard as input :
http://xoscope.sourceforge.net/ (http://xoscope.sourceforge.net/)
I have to find a way to protect the sound input of my zaurus
-
castlebbs - do you have a schematic. What specs is your voltmeter / what are you using for a ADC and how much resolution do you have?
-
One of the next things i will be doing is looking into getting a serial programmer assembled and working with the Z. Anybody got those serial pinouts / more information on the serial port for me?
I have it reading the 10-bit value and displaying it on 4 digit 7 segments. It's soo cool having 3 full 8 bit ports (not connected with last sentence).
My current attention is to get a nokia 5510/3210/3310 lcd screen working with the pics. I will provide links to the relevant information so others can have a look. All feedback on this project is welcome!
-
Links about nokia lcds interfacing to the pics (those based on the pcd8544 controller)
http://www.100acre.org/elec/nokia_lcd/ (http://www.100acre.org/elec/nokia_lcd/)
http://serdisplib.sourceforge.net/ser/pcd8544.html (http://serdisplib.sourceforge.net/ser/pcd8544.html)
http://users.skynet.be/bk317494/index.htm (http://users.skynet.be/bk317494/index.htm)
http://sandiding.tripod.com/Bertys.html (http://sandiding.tripod.com/Bertys.html)
Does anyone know / can find what the specs / driver chip of the siemens s25 are? I have one of these 4 colour screens with white backlight and it would be fantastic to be able to use it.
-
Ever considered using LabVIEW (www.ni.com)? It lets you create a virtual instrument for pretty much anything you can come up with. They have versions for windows, linux, mac, sun, and PPC/Palm. Perhaps someone could port this thing? I'd love to see it done, we use it at work, and I want a reason for my company to buy me a work Z
-
Sorry Joeboo, i want to do this as a final year project.
I've gotten the pinout of the serial port from devnet, but it seems that the serial port is a little annoying regarding its specification. I will attempt to get the pic to communicate with a pc before i look at the Z... If not the serial then i should be able to send the same information over IR? Is there a different protocol, does anyone have an experiece? Can i load minicom and point it to the IR port as a standard serial port?
-
So, can i read the IR as a standard serial port?
No doubt, you've seen that i'm trying to compile octave. I hope to use it as i'm using matlab on my desktop - to display traces using gnuplot of the input waveforms from my project.
My question is - is there an alternative program that would do this? It doesn't need to do much computation, only to take the values from the serial port and plot. Can gnuplot directly take values from the serial port?
-
Hi all, I found that i could write a C program and directly pipe the output into gnuplot.
I am going to order a serial connector and make up a cable... My question is, does the serial port work directly in pdaxrom?
-
Omega,
Reading this post gives me Deva Vu. Are you also soliciting information from gnupic@linuxhacker.org? It seems I've got a similar goal, but you've been working on this longer than me. I'd like to get in touch with you sometime soon.
-
Hi all, still working away on this project. Well actually i'm finishing up the other parts of the project (multichannel multiple lcd multimeter), and now i'm starting to look again at the oscilloscope functionality that I wish to add.
I can't remember if i stated it before, but i have developed a beta of the assembly code for the microcontroller and i have been able to display a waveform in Matlab running on windows. However, I want this to work on my Z!
Here's what I need - some direction on how to read the serial port within a gcc compiled c program in RC8 pdaxrom. I have found the serial howto / serial programming howto and I will be reading these shortly but at first glance they don't seem to offer simple code for asynchronous reception of data over the serial port... It must be somewhere, however after looking through dozens of books in our college last night including ones for engineers, etc I could not find any suitable information.
-
just open the serial port (one of the /dev/ttyS devices) as a file and read from it.
IRK does this for the irda serial port....
-
I saw this in Components In Electronics Magazine (http://www.cieonline.co.uk/cie2/?pid=723) this morning:
http://www.elandigitalsystems.com/usb/usbscope50.php (http://www.elandigitalsystems.com/usb/usbscope50.php)
looks like a really neat/useful device. pity there's no mention of linux support in any sense. I might email them anyway, as even a basic USB driver or specification would be v useful.
-
That would be awesome if we could get one of those working on a 6k/1k/3k. nothing like having an oscilloscope/logger in your pocket
-
http://www.elandigitalsystems.com/usb/usbscope50.php (http://www.elandigitalsystems.com/usb/usbscope50.php)
I emailed elan to ask price, availability USB drivers for linux and PDAs. They told me to talk to their distributor Peak UK, and I'm currently waiting for a reply.
Like others, I have wondered whether the microphone input could be used; it'll probably be limited to 10Hz up to 10kHz, with a capacity to block DC and some sort of low pass filter to reduce digital hash; however, it could still be useful.
Paul
-
talk to their distributor Peak UK, and I'm currently waiting for a reply.
I got a reply from peak's saleman, he said it was OK to publish his reply:
Thank you for your enquiry, yes we can supply the USBscope, we will take our first delivery in mid August.
The cost for a 1 off is £198.53 + £5.50 carriage and VAT.
The current consumption is 200Ma but it is really dependant on the other hardware you are using, it is supplied with software for 98SE, 2K and XP.
There is a possibility of Elan including Linux support, as many of their other products do but nothing has been confirmed as yet.
We have nearly sold out of the first batch coming in so if you need one its well worth getting an order in.
Regards,
Stephen Mander
Industrial & OEM Sales
Peak Development Ltd
I also talked to him by phone, and he says Elan might be persuaded to do a linux driver and SDK, and let the opensource community do the rest! I suggested that you could use this as a high performance AD converter and do magic things like software radios. I asked about current consumption, and he says as yet he doesn't know if it's the peak or the average - more details will be available when they start to ship.
I reckon 200mA would be a bit much for a Z 1000, 3000 or 3100 to source, but a battery powered USB hub would probably do it. Even so, you'd still have a really neat pocket scope.
Paul
-
I use PIC too. But why you dont make a program that accepts serial data to the IRDA of the zaurus and then plot it or make a ir serial terminal to show and send data from the zaurus.
By the way, i have the GBDSO (GameBoy Digital Osciloscope)
With this GBDSO i made my ultrasonic distance sensor of my little robot.