Here is another way.
http://www.picbasic.co.uk/forum/cont...oving-readings
Here is another way.
http://www.picbasic.co.uk/forum/cont...oving-readings
Dave
Always wear safety glasses while programming.
Yes, your good self and Henrik explained FOR/NEXT loop and LOOKUP when I was using a BCD driver to make a seven segment display count up and down from 0-9 and write my name. Seems like ages ago now, it was only February/March this yearHave you done a FOR/NEXT loop yet?
So your example adds the value S_TEMP to the stored value ADC_TEMP which is done 20 times, then the ADC_TEMP value is output as OUT_TEMP a 20 cycle average (I hope I've read this right).
Now I'm thinking thermocouple / ADC / Seven segment display.....Another project!
Ah, before I forget, from your ADC/rentron explanation link you posted earlier. The ADC conversion is displayed on a rather nice data logger display, is this logger included in the Microcode studio package the same as the Serial Communicator? Image below:
Dave
I sometimes think DT is part machineThe stuff he comes up with is invaluable around here. I am just happy that he shares his hard earned knowledge.
The GUI from Bruce's site I think is written in Visual Basic. Here is something he has to offer.
http://www.rentron.com/AD_LOG.htm
Do you have a language for the PC that you use? You could make you own.
Dave
Always wear safety glasses while programming.
The same as that. Anyone who gives of their time / knowledge gets my appreciation. Maybe one day I'll be able to help someone out, hey maybe other 'lurker newbies' have been indireclty helped by the Q's I've asked, even the answers I given.
Thanks for that mackrackit.The GUI from Bruce's site I think is written in Visual Basic. Here is something he has to offer.
http://www.rentron.com/AD_LOG.htm
Well I do swear at it from time to timeDo you have a language for the PC that you use? You could make you own.I don't think I'm clever enough to make my own data_logger application though. Interestingly, when I was researching rfpic's, several times I came across Visual Basic being used in applications to store transmitted_data. For this project
when the daily count is transmitted from rfpic - pic - to serial communicator it will need to be stored somewhere, so maybe a visual basic application could be the answer.
I have got Microsoft VB 2008 Express Edition on my pc, also Visual C++
Dave
Last edited by LEDave; - 11th August 2010 at 15:25.
I would imagine they have been..hey maybe other 'lurker newbies' have been indireclty helped by the Q's I've asked, even the answers I given.
VB 2008.. I hear it is not to bad. Does it have comms built in?
Dave
Always wear safety glasses while programming.
I don't knowDoes it have comms built in?
I did find these headings though:
How to: Show Available Serial Ports in Visual Basic
Demonstrates how to show available serial ports.
How to: Dial Modems Attached to Serial Ports in Visual Basic
Demonstrates how to dial a modem attached to the serial port of a computer.
How to: Send Strings to Serial Ports in Visual Basic
Demonstrates how to send a string to a computer's serial port.
How to: Receive Strings From Serial Ports in Visual Basic
Demonstrates how to receive a string from a computer's serial port.
If all of that is from VB08 then I would say you have what you need.
Sounds like you will be writing a test terminal soon![]()
Dave
Always wear safety glasses while programming.
Mmm.Sounds like you will be writing a test terminal soon
How about:
Something like this maybe (a VB example)......?
Code:Function ReceiveSerialData() As String ' Receive strings from a serial port. Dim returnStr As String = "" Using com1 As IO.Ports.SerialPort = _ My.Computer.Ports.OpenSerialPort("COM1") Do Dim Incoming As String = com1.ReadLine() If Incoming Is Nothing Then Exit Do Else returnStr &= Incoming & vbCrLf End If Loop End Using Return returnStr End Function
VB 5 was the "in thing" the last time I used it.
So...
Does it work?
Dave
Always wear safety glasses while programming.
I don't know. I'm not even sure what application to use, is it a:So... Does it work?
1/ Windows Form Application
2/ Class Library
3/ WPF Application
4/ WPF Browser Application
5/ Console Application
I know less about VB than I do PIC_Basic.........(a lot less)
Also the serial port is on a turn of the Century Compaq pc so I'd have to transfer the application over I guess.
Dave
Last edited by LEDave; - 11th August 2010 at 18:13.
My guess would be
1/ Windows Form Application
Have you ever tried a serial to USB converter?
PC code... Being that you do not mind a learning curve and not all that familiar with VB, you could start learning Python or something like that. In my opinion there is something to be said about cross platform comparability. Linux, MAC OS, Windows, in the back ground on a server, Droids, broken iPhones...
Dave
Always wear safety glasses while programming.
I was just thinking the same thing over tea. It would be really neat to have a complete project that gathers the data, rfpic's it over then stores it in an application / program.Being that you do not mind a learning curve and not all that familiar with VB, you could start learning.......
So PYTHON v's VB how similar or which is best / more suited?
Is this the sort of thing, serial to USB?
http://www.amazon.co.uk/USB-RS232-Co.../dp/B00077DJIQ
Here's some good info on VB over at rentron.
http://www.rentron.com/VisualBasic.htm
Check out the Receiving Data From A Microcontroller and Sending Data To A Microcontroller sections. (but read the others too)
And no, I'm not a machine ...
By definition, a machine does "work".
I'm too busy playing for that.![]()
DT
Will do Darrel, thanks for the info / pointer.Check out the Receiving Data From A Microcontroller and Sending Data To A Microcontroller sections.
Me thinks I suddenly have a little bit of learning to do
Dave
Well I 'ment that in a good way.And no, I'm not a machine ...
By definition, a machine does "work".
I'm too busy playing for that.
Yup, that is the cable.
That is a loaded question. Could start a heated debate...So PYTHON v's VB how similar or which is best / more suited?
Not similar at all. There are a few GUI builders for Python but the strange thing is, not all of the GUIs are cross platform. Tk comes with the typical python install, cross platform, but some say it is not the prettiest.
The guy that invented python was/is a C programmer so python looks more like C at first glance.
More suited... ???
VB is pretty much locked to windows, we know that..., but if that does not bother you..
In the end I will say it depends on the person at the keyboard. They will both make reliable code.
I will bet you could have something up and running faster with VB. The link Darrel gave should really speed things up.
Dave
Always wear safety glasses while programming.
That'll be me then.......worryinglyI will say it depends on the person at the keyboard.
I'll go with VB for the project then.I will bet you could have something up and running faster with VB.
I think it's only fair to mention that when I look at VB code, I have the same / less understanding than when I lit my first PICBASIC led. That's not to say I won't give it my best shot though.The link Darrel gave should really speed things up
I'll order up a cable.
Dave
Last edited by LEDave; - 11th August 2010 at 20:40.
I've just re-read:
Clever or what!Receiving Data From A Microcontroller
I'm off to bed now to think about what I don't know
&
And dream about what I might know fairly soon
Dave
I've ordered the USB-RS cable up.
Not sure how to go about learning VB, so I was thinking of going through the RENTRON rec/send programs line by line and taking notes.
Dave
Make an app with a "button" that when clicked writes "hello world" in a text box.
Then you can move to displaying the serial input in the same Tbox.
And of course read everything Bruce has to offer....
Dave
Always wear safety glasses while programming.
I've now got an App with a text box and a button
All I need now is to figure out how to display 'Hello World' when the button is pressed
This is going to take a while as I've loads of reading to do, so please bear with me. If I get really stuck then I'll have to ask.
Have a nice Weekend everybody.
VB_Dave
And in color...All I need now is to figure out how to display 'Hello World' when the button is pressed![]()
Dave
Always wear safety glasses while programming.
A small breakthrough: "Hello World" when the button is pressed.......:
I just read this: And in color... ! I'm more of a Henry Ford man myself, color it is then.....!Code:Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = "Hello World" End Sub End Class
Dave
Last edited by LEDave; - 12th August 2010 at 21:16.
RED Mustangs ??? The new Ford
Might be cool to have numbers and letters a different color..... If you are making your own terminal thing may as well trick it out...
Dave
Always wear safety glasses while programming.
This is my 'attemp' to write the 'H' 'e' of Hello world in different colors in the text box.The 'Button' in the Form when pressed outputs the text 'He'.
Is this remotely close or am I heading North......again
I think I needed to add somehow/somewhere to get the colors to work/change:Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim First As String Dim second As String Dim Third As String Dim value As Color value = Color.Red First = "H" value = Color.Blue second = "e" Third = First & second TextBox1.Text = Third End Sub End Class
My brother_in_law used to have a Mustang (V8) I was about 14 when he had it. I'm not sure if I liked the looks or the sound the bestCode:Public Shared ReadOnly Property Red As Color
Dave
Like I said, been a long time since I used VB..
I think you will need to parse the string into an array maybe and then check the elements, I will not even try the syntax. But this might give some clues.
http://www.vb6.us/tutorials/vb-strin...it-join-filter
Dave
Always wear safety glasses while programming.
Hi mackrackit,
I've heard of all three and never used any of them, so more reading for me tonight.I think you will need to parse the string into an array maybe and then check the elements
I suppose an array is an array, if I learn about them for VB the same theory applies to a picbasic array so all part of the learning curve, the same for parse and elements.
Dave
I would not get hung up on the color thing right now, but of course it is up to you.
Getting the data from the MCU to VB is the important part. Dressing it up can come later.
Dave
Always wear safety glasses while programming.
Hi mackrackit,
Indeed, Ill stick with that for now.Getting the data from the MCU to VB is the important part. Dressing it up can come later.
As as aside:
Learning to program is similar to learning to play a keyboard in that you want to be able to jump in and create/play something just like the original, however there's a big learning curve to be overcome and there are no short cuts! Wonderful feeling when things start to happen though.
Dave
I'm still going through the VB stuff and waiting for the usb lead to arrive in between a busy schedule.........
Dave
Did you see this?
http://www.picbasic.co.uk/forum/showthread.php?t=13609
Post #9 and #10.
Dave
Always wear safety glasses while programming.
Cheers mackrackit,
That's one serious and impressive interface. I think the thing that really impresses me the most here is the way you guys 'see' the solution in software if that makes sense, very,very impressive.
I'm going to have to play catch up and try and fill some very large gaps in my knowledge base (if I can).
Here's trying.
Dave
I've been installing the software for the USB-serial cable and a warning has come up saying basically that the software hasn't passed Windows logo testing and may destabalize or impair system performance now or in the future.......
Should I ignore and install or head the warning? I've made a system restore point before I started the install.
Or is there another driver that would do the job?
Dave
I saw this on the amazon link you gave
Bought this cable, and the little CD that came with it clearly assumed a greater level of knowledge than I possessed! I was lost and couldn't install a driver for it. Then I found the link to the seller (Aquarius Computers) and an invitation to contact via a contact form. This was 2.30pm on a Saturday, and by 4pm same day I had a reply pointing me at a site to directly download the driver, which was straightforward to install. Everything working smoothly now.
If you have the same problem (I have XP and using the cable to run an external modem) Google "PL-2303 Software and Drivers" (include the double quotes) and choose the link ending ID=31. There, on the Prolific Technology Inc. site, you will find a file to download called wd_pl2303_v20019v2028.zip. Caters for Win98SE/ME and Win2K/XP/2003.
Dave
Always wear safety glasses while programming.
Hi mackrackit,
On the disc there's a folder called: PL2303 which contains a winxp folder containing: PL2303-DRIVER-INSTALLER.
Is that the one I need / should install?
Dave
I would get the latest greatest from the manufacture.
What OS are you running?
Dave
Always wear safety glasses while programming.
XP.What OS are you running?
Shall I go for:
This one:Google "PL-2303 Software and Drivers"?
DavePL-2303 USB to Serial Bridge (H, HX, X) Installshield Driver Setup Program
Installer version & Build date: 1.3.0 (2010-7-15)
Windows 98/ME Driver: v2.0.0.19
Windows 2000/XP/Server2003 (32 & 64-bit) WDM WHQL Driver: v2.0.13.130
Windows Vista/7/Server2008 (32 & 64-bit) WDF WHQL Driver: v3.3.11.152
Language Support: English (default), Chinese (Traditional), Chinese (Simplified), Japanese
For Prolific USB VID_067B&PID_2303 Only
Last edited by LEDave; - 18th August 2010 at 22:58.
That looks good.
You did say a fresh restore point has been made. Are you backed-up?![]()
Dave
Always wear safety glasses while programming.
10 days ago, I could do a new one in the morning. I do a complete disc image, it's worth it.Are you backed-up?
Dave
Mmm,
Well I installed the driver:However it says:Prolific USB-Serial Com Port (COM3)And code 10 from M-SOFT says:This device cannot start. (Code 10)
I've deleted and re-installed it, same outcome and checked for a later driver, same outcome.Code 10
If the device has a FailReasonString value in its hardware key, that string is displayed as the error message. The driver or enumerator puts this registry string value there. If there is no FailReasonString in the hardware key, you receive the following error message:
This device cannot start. (Code 10)
Recommended resolutions
Here are some things that you can try to resolve this problem.
Update the driver
In the device Properties dialog box, click the Driver tab, and then click Update Driver to start the Hardware Update Wizard. Follow the instructions to update the driver.
You may be prompted to provide the path of the driver. Windows may have the driver built-in, or may still have the driver files installed from the last time that you set up the device. If you are asked for the driver and you do not have it, you can try to download the latest driver from the hardware vendor’s Web site.
What's meant to happen here then mackrackit, is the USB-Serial meant to work through the Serial Communicator or via it's own application?
Dave
Bookmarks