12f675_fuse_about_to_blow! - Page 19


Closed Thread
Page 19 of 24 FirstFirst ... 9151617181920212223 ... LastLast
Results 721 to 760 of 929
  1. #721
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Once it is installed it will look just like a regular serial port to your PC. You will be able to use serial communicator, hyper-terminal or whatever else you have.

    Device manager shows it as COM3?

    When in Device Manager and trying to update the driver from there, do you get any errors?
    Like maybe the software does not support the device?
    Dave
    Always wear safety glasses while programming.

  2. #722
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    When in Device Manager and trying to update the driver from there, do you get any errors? Like maybe the software does not support the device?
    No it (Windows) says couldn't find a better match.

    It definately says PORTCOM3

  3. #723
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    If manually pointing to the driver and restarting the machine does not make it work I would say you got the Amazon/Ebay scam

    http://www.prolific.com.tw/eng/FAQs.asp?ID=50
    Dave
    Always wear safety glasses while programming.

  4. #724
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Looks like it doesn't it...........Looks like I've been fleeced!

    Back to the drawing board....!

    Are there any other drivers out there we know of (he typed hopefully)?

    Dave

  5. #725
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    I was searching the net for a RS343 - USB driver and came across this freeware datalogger, looks interesting:
    http://download.cnet.com/RS232-Data-...html?tag=mncol

    Also for any newbies who followed the ADC mackrackit worked through recenlty, here's an interesting article I came across at Microchip, hope it helps:
    Attached Images Attached Images

  6. #726
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Are there any other drivers out there we know of (he typed hopefully)?
    Difficult to fix bad hardware with software.

    A little more money than the one you have but I have three of these and so far so good.
    http://www.tripplite.com/en/products...xtModelID=2430
    Dave
    Always wear safety glasses while programming.

  7. #727
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    I thought I'd give the cable 'one more go' and would you believe it the cable 'connected' to the PIC. It wouldn't send/receive at first though, so changed the settings to:

    Code:
    COM1 :BAUD 2400 :No Parity :Byte size is 8 :1 stop bit
    And seems to be working now

    Do those settings seem ok to you?

    How lucky was that! I very nearly called it a day with that cable/driver.

    Dave

  8. #728
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    COOL!!!!

    Yup, those settings are fine.
    As long as they match the PIC.
    Dave
    Always wear safety glasses while programming.

  9. #729
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Well the PIC is 2400 inverted.

    That really was the last throw of the dice regards the driver/cable, thought I'd lucked out there.

    So now I can use the serial communicator on my DELL without having to wear headphones when the old COMPAQ fires up (it sounds like a hair dryer.....

    Dave

  10. #730
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    I'm still working through the VB stuff, lots to learn still and slow progress being made. I'm thinking I'll post VB questions on the VB-PIC thread that was linked here the other day.

    Dave

  11. #731
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    I've decided that there are two elements to the project the I need to target my learning on:

    1/ The rfpic tx/rx - I guess breaking down, learning and modifying Bruce's programs in a nutshell.

    2/ VB and transferring the rx data from the PIC into a VB text file.

    With regards to VB, I think I'm better off trying to learn the basics rather then copy_in sections of code and debug any errors. I know this is going to be much slower but I should come out the other end of a learning curve with a much better understanding of programming in general. Time is not an issue here with this project, I've got until next Spring really, so with Winter to get through I should have plenty of time to learn.

    Do you think this is the most sensible approach here, or am I going in to deep?

    Also for any 'newbie VBer's, I came across this the other day, starts right from the beginning:

    http://www.homeandlearn.co.uk/net/nets1p2.html

    Dave

  12. #732
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Sounds like a good plan to me.

    I will go back over the RF stuff in a day or so ( I do not have those modules) and maybe we can get them going soon.

    In the mean time maybe you could bread board a chip with it's own power supply serialing out a random set of numbers every few seconds , make sure serial communicator/ hyperterminal can "see" it. That will then be the test signal for VB.

    Two projects going at once... Get flustered with one drop back to the other.....

    ?????
    Dave
    Always wear safety glasses while programming.

  13. #733
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Sounds like a good plan to me.
    Thanks for that mackrackit, I was a little uncertain as to which way to go.

    I will go back over the RF stuff in a day or so ( I do not have those modules) and maybe we can get them going soon.
    That would be great. I've managed to get them to tx/rx as per Bruce's code and I have two sets of PDF's (full & abridged).

    In the mean time maybe you could bread board a chip with it's own power supply serialing out a random set of numbers every few seconds , make sure serial communicator/ hyperterminal can "see" it. That will then be the test signal for VB.
    I'll be on it tonight

    Cheers: Dave

  14. #734
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    The PIC is wired independently and the USB - Serial communicator displays the numbers as per the COM port on the old pc, so no problems so far.

    Code:
    ANSEL   = %00000000    'Disable analog select so ports work as digital i/o.
    CMCON0  = %00000111    'Disable analog comparators.
    TRISA   = %00000000    'Set PORTA as OUTPUT.
    PORTA   = %00000000    'Set PORTA pins all low.
    TRISC   = %00000000    'Set PORTC as OUTPUT.
    PORTC   = %00000000    'Set PORTC pins all low.
    
    
    DEFINE OSC 4
    
    X VAR WORD
    Y VAR WORD
    Z VAR WORD
    
    main:
    Random X
    Y = X * 1000
    Z = DIV32 21845
    SEROUT2 PORTC.3, 16780, [DEC Z, 10, 13]
    pause 4000
    GOTO MAIN
    Dave

  15. #735
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I would say now on the VB part to start with a simple terminal type program to display the serial data like Serial Communicator does. Worry about data saving and stuff later.
    Dave
    Always wear safety glasses while programming.

  16. #736
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    I would say now on the VB part to start with a simple terminal type program to display the serial data like Serial Communicator does.
    Ok, I'll stick with / at it and see what I can come up with.

    Dave

  17. #737
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    Just to let you know I've been spending hours going through the VB exercises and taking notes in the hope that I'll eventually be able to get the PIC - VB program working.

    Although it's time consuming, it's not time wasted in my view as there are some of the basics I still don't fully understand.

    Dave

  18. #738
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Have you ran across any good VB forums yet?
    Dave
    Always wear safety glasses while programming.

  19. #739
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    I've just posted a question on the PIC / VB thread.

    http://www.picbasic.co.uk/forum/show...3080#post93080

    Have you ran across any good VB forums yet?
    I'm must have been through half of Google HDD's trying to find a 'ready made' solution, I never thought to actually 'join' a VB Forum

    Dave

  20. #740
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    If you are interested I started some Python stuff at the web site in my signature.
    I will be adding more as time permits.
    Dave
    Always wear safety glasses while programming.

  21. #741
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    If you are interested I started some Python stuff at the web site in my signature.
    Short answer is yes I am interested and thanks for posting the link. Right now I've managed to get a VB-2008 program to open and close Port_Com1 when I run debug, which is a breakthrough. If I can get it to receive data from the PIC then....... But so far no luck....

    Give me a few more days to try and crack it, if I can't I'll jump ship to Python (I might do that anyway).

    It's a shame that the 'RENTRON'? "Receiving Data From A Microcontroller" program was a different VB version, I'd just about got a handle on it in the broadest of senses, ho hum.

    The VB stuff has been good for me though, it shows up the gaping wholes in my knowledge bank, you really can't run before you can walk with this stuff. Ill keep taking the small steps though.

    Just to add, when I open Com1 in VB, then try to open Com1 with serial Communicator, it show the Port in use. When I close Com1 in VB, I can then open it with the Serial Communicator. I'm using this as a test / check.

    How big a step forward is getting the Com Port to open and shut?

    Cheers: Dave
    Last edited by LEDave; - 29th August 2010 at 23:53.

  22. #742
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    How big a step forward is getting the Com Port to open and shut?
    Sounds like you are getting there.

    I did download VB 2010, looked at it a bit, watched a tutorial or two, and shut it down.

    If you are learning from scratch and do not mind windows only then keep at it. IMHO
    Dave
    Always wear safety glasses while programming.

  23. #743
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Sounds like you are getting there.
    I've got that sinking feeling there's some way to go yet. It would be nice to be pleasantly surprised though.

    I think it (the program) needs some sort of event handler / buffer to store and read the data_in in bytes and then make words.

    If you are learning from scratch and do not mind windows only then keep at it. IMHO
    I'll stick at the VB2008 for now and see what I can 'cobble' together.

    Dave

  24. #744
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    I've now become officially obsessed with getting the VB program to receive data from the PIC. I'm going to stick at it until I do. I still haven't got much beyond opening and closing the COM port at the moment though, still doing loads of reading.

    I'll get there (one day).

    Dave

  25. #745
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    officially obsessed

    Probably not something for a business card.

    Opening and closing the port. Sounds like you are almost there.
    Dave
    Always wear safety glasses while programming.

  26. #746
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    The worlds most 'Obsessive' but slow programmer has now got a ' ListBox' that is receiving data from the PIC. Ok, it's mainly gibberish interspersed with the odd number but it's progress (I know, evolution happens faster then my programs)

    Probably not something for a business card
    I agree. How about a perfume....? Maybe not thinking about it

    Dave

  27. #747
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    COOL!!!!
    But why are you sending gibberish to the PC?

    yea, a par fume. Love that new chip smell

    Just wondering if the VB program has the port set different than the chip?
    Dave
    Always wear safety glasses while programming.

  28. #748
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    The VB Port is set at:

    Code:
    SerialPort1.PortName = "COM1"
            SerialPort1.Parity = IO.Ports.Parity.None
            SerialPort1.BaudRate = 2400
            SerialPort1.DataBits = 8
            SerialPort1.StopBits = 1
    The PIC is:

    Code:
    SEROUT2 PORTC.3, 16780, [DEC z, 10, 13]
    Does that look ok?

    Dave

  29. #749
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    That looks correct to me.
    Is this using the USB converter?
    Dave
    Always wear safety glasses while programming.

  30. #750
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Is this using the USB converter?
    Yes it is. The PIC to serial Communicator via the USB converter worked 100%, which was a good bench test for the VB program.

    I've modified the PIC program to transmit a RANDOM BYTE rather than a RANDOM WORD code below:

    Code:
    A VAR WORD
    X VAR WORD
    Y VAR WORD
    Z VAR BYTE
    
    main:
    Random A
    Y = A * 100
    X = DIV32 25700
    LET Z = X
    
    SEROUT2 PORTC.3, 16780, [DEC z, 10, 13]
    pause 4000
    GOTO MAIN
    PYTHON might still be the answer yet.

    Dave
    Last edited by LEDave; - 6th September 2010 at 12:44.

  31. #751
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Have you tried setting the port parameters in device manager? Maybe VB relies on those settings?
    Dave
    Always wear safety glasses while programming.

  32. #752
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Have you tried setting the port parameters in device manager?
    A good idea that mackrackit, the baud rate was set differently but when adjusted still the same sort of input.

    I think my program needs adjusting / more work, Ill have another look tonight.

    Dave
    Last edited by LEDave; - 6th September 2010 at 16:03.

  33. #753
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    Another small step forward tonight in that I changed the line in the PIC code from:

    Code:
    SEROUT2 PORTC.3, 16780, [DEC z, 10, 13]
    To this:

    Code:
    SEROUT2 PORTC.3, 16780, [DEC z]
    Removing the line space? and carriage return made the VB program display a continual vertical line of numbers (no more gibberish )

    All I need to do now is to make the VB read each individual BYTE in the COM PORT instead of a continual line of numbers (BYTES).

    Dave

  34. #754
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Interesting..
    What if you try
    ,$d,$a
    in place of
    ,10,13

    Maybe that would make VB happy?
    Dave
    Always wear safety glasses while programming.

  35. #755
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Well, what happens now is, the data is coming in (vertical line of numbers on the left hand side of the listbox) so I'm getting for example:

    1
    3
    5
    *
    *
    2
    0
    3
    *
    *
    1
    1
    *
    *
    The asterisk's represent what appears to be a number 1 in a thin bold square, which occurs after each transmitted BYTE with a four second delay as per the program, interesting. The Serial Communicator still worked a treat with ,$d,$a. I need to get the incoming numbers Horizontal and maybe spaced one line apart for ease of reading.

    Any other ideas?

    Dave

  36. #756
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I think I may be confused.
    VB has the numbers
    1
    3
    5
    *
    *
    2
    0
    3
    *
    And Serial Communicator has them
    135
    203
    ??
    Dave
    Always wear safety glasses while programming.

  37. #757
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    That's spot on mackrackit.

    I think the VB prog maybe displaying the correct random BYTE sent from the PIC only vertically as opposed to horizontally.

    Dave
    Last edited by LEDave; - 8th September 2010 at 05:28.

  38. #758
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Are you DIMing the VB input as a string as shown here. "Dim recepcao As String"
    http://www.picbasic.co.uk/forum/show...2628#post92628
    Dave
    Always wear safety glasses while programming.

  39. #759
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    Sorry for the late reply.

    Are you DIMing the VB input as a string as shown here. "Dim recepcao As String"
    Well I tried to. The problem is with the posted program as I see it, is that it's not actually outputting any data to a Textbox or Listbox which is what I need to do .Also with VB 2008 you have to use INVOKE or an INVOKER to make a cross thread call else you incur an error(I think).

    Here are my two programs. One from the other thread below (Which doesn't receive data):

    Code:
    Public Class Form1
        Dim WithEvents SerialPort1 As New IO.Ports.SerialPort
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
            SerialPort1.PortName = "COM1"
            SerialPort1.Parity = IO.Ports.Parity.None
            SerialPort1.BaudRate = 2400
            SerialPort1.DataBits = 8
            SerialPort1.StopBits = 1
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            If SerialPort1.IsOpen = False Then SerialPort1.Open()
            If SerialPort1.IsOpen = True Then MsgBox("com1 port opened sucessfully")
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            If SerialPort1.IsOpen = True Then SerialPort1.Close()
            If SerialPort1.IsOpen = False Then MsgBox("com1 port closed sucessfully")
    
        End Sub
    
        Private Sub DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
            Dim recepcao As String
    
            recepcao = SerialPort1.ReadExisting
    
    
    
        End Sub
    
    
        Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
            SerialPort1.Write(ListBox1.Text)
    The other using INVOKE which nearly works, it stacks the incoming data vertically (as previously discussed) but it does receive data from the PIC:

    Code:
    Imports System
    Imports System.ComponentModel
    Imports System.Threading
    Imports System.Windows.Forms
    
    
    Public Class Form1
    
    
        'Buffer for receievd data***
    
        Private Delegate Sub AddListBoxItemInvoker(ByVal item As Object)
    
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            SerialPort1.PortName = "COM1"
            SerialPort1.Parity = IO.Ports.Parity.None
            SerialPort1.BaudRate = 2400
            SerialPort1.DataBits = 8
            SerialPort1.StopBits = 1
    
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
            If SerialPort1.IsOpen = False Then SerialPort1.Open()
            If SerialPort1.IsOpen = True Then MsgBox("com1 port opened sucessfully")
    
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            If SerialPort1.IsOpen = True Then SerialPort1.Close()
    
            If SerialPort1.IsOpen = False Then MsgBox("com1 port closed sucessfully")
    
        End Sub
    
        
    
        Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
    
            Me.AddListBoxItem(SerialPort1.ReadExisting)
    
    
        End Sub
    
        Private Sub AddListBoxItem(ByVal item As Object)
    
            If Me.ListBox1.InvokeRequired Then
                'We are on a secondary thread so delegation is required.
                Me.ListBox1.Invoke(New AddListBoxItemInvoker(AddressOf AddListBoxItem), (item))
    
            Else
                'We are on the primary thread so add the item.
                Me.ListBox1.Items.Add(item)
            End If
        End Sub
    End Class
    Any ideas? Or maybe a passing VB'er might have the answer.

    Should I post this over on the other thread do you think?


    Dave

  40. #760
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Should I post this over on the other thread do you think?
    yup
    I would. Makes no sense to me.
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts