Serin serout problem


Closed Thread
Results 1 to 40 of 337

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I put back the circuit together with one L298.
    added caps, Its really hard to make them stick onto the motors, any thoughts?
    Also it was not working at first, I realized that my Pic chip was not putting some pins at high. I changed the program so the pin output went from portC to portD and it worked. I reprogrammed the chip a few times, those couple of pins on PortC are not working no more. Can I revived them ? what happened..

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    I put back the circuit together with one L298.
    added caps, Its really hard to make them stick onto the motors, any thoughts?
    Also it was not working at first, I realized that my Pic chip was not putting some pins at high. I changed the program so the pin output went from portC to portD and it worked. I reprogrammed the chip a few times, those couple of pins on PortC are not working no more. Can I revived them ? what happened..
    Post your circuit, otherwise it's hopeless...

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    basically I am driving the h_bridge directly from microcontroller. Some one told me to use an opto coupler. BUt the output of the microcontroller is hooked up to the enable of the h-bridge, how can that fry my pins. I just fried my ccp pin..
    Also, would it be better to use a seperate power supply for the controlelr and h-bridge?

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    basically I am driving the h_bridge directly from microcontroller. Some one told me to use an opto coupler. BUt the output of the microcontroller is hooked up to the enable of the h-bridge, how can that fry my pins. I just fried my ccp pin..
    Also, would it be better to use a seperate power supply for the controlelr and h-bridge?
    Like I said, post the circuit! We can hook you up with good info much quicker that way.

  5. #5
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    ok, i need to draw it
    any software has a 40 pin chip ?

  6. #6
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    the output of the microcontroller is hooked up to the enable of the h-bridge, how can that fry my pins. I just fried my ccp pin..
    Under normal circumstances, it shouldnt.

    Having said that, you have already destroyed on H-Bridge which is being fed from your 12V supply. When that chip died it is possible that the 12v supply got fed back to your PIC.

    One phone system that I used to work on had ULN2803 drivers for the relays. The phone system CPU was running on a 5v power supply but the relays were running off 47v. When systems were hit by lightning the power supply would normally die and sometimes the ULN2803s would be damaged. If you didnt find the damaged ones and replace them they would fail shortly after the system was powered up and stuff the 47v supply into the CPU killing it and the new PSU

    I think you need to read up more on the basics of electronics as to date in this thread you have

    Toasted an LCD
    Cooked an H-Bridge
    Fried a PIC

    .... maybe a job in the catering trade would be more suitable based on the above

    A picture is worth a thousand words so as Skimask suggested, a look at your schematic may give us the chance to help you resolve your problems. We have all been down the road of killing components, its how you build up experience. Expensive but it forces you to learn quickly !!!!
    Keith

    www.diyha.co.uk
    www.kat5.tv

  7. #7
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    as for the lCd that is entirely my fault,

    but are you saying opto couplers are not necessary?
    when should they be used. ?
    i just read a few reports of similar problem that where resolved this way.
    pic:
    http://www3.sympatico.ca/lerameur/PDR_0141.jpg

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    as for the lCd that is entirely my fault,

    but are you saying opto couplers are not necessary?
    when should they be used. ?
    i just read a few reports of similar problem that where resolved this way.
    pic:
    http://www3.sympatico.ca/lerameur/PDR_0141.jpg
    Sorry guy...I can't make heads or tails of the picture in your last post.

  9. #9
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I decided i am going to put relays instead of an H-bridge.
    I recently obtained some nice sensors from Taosinc.com. I wrote this program but it does not work. The datasheet is not complicated, but maybe I missed something. I seems that i need to put SI to high after the 129th clock. maybe I am not using the pulsin command right.


    datasheet:
    http://www.taosinc.com/images/produc...401R-LF-E4.PDF

    My program:
    sensor var byte: counter var byte : pulse var byte

    TRISB = %00000000
    TRISA = %11111111

    loop:

    'clock input on RB0
    'after 18 clock input at 1, count 111 clock cycles after the reset
    pulse = 0

    counting:
    Pulsin PortA.1,1,pulse
    pulse = pulse +1
    if pulse = 18 then goto continue
    goto counting

    continue:

    Pulsin PortA.1,1,pulse
    pulse = pulse +1
    if pulse = 130 then goto continue2
    goto counting

    continue2:
    porb.0 = 1 'Si is now high
    Pulsin PortA.1,1,pulse
    pulse = pulse +1
    if pulse = 131 then goto continue3
    goto continue2

    continue3:
    ADCON0.2 = 1 'Start Conversion
    porb.0 = 0 'put the SI back to zero
    ADCIN 0, sensor 'Read channel PORTA.0
    pause 50

    Lcdout $fe, 1 'Clear screen
    Lcdout "Sensor: ", Dec sensor
    Pause 200

    goto loop

    end

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  3. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44
  4. Replies: 11
    Last Post: - 13th July 2005, 19:26
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

Members who have read this thread : 0

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