Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

laptop->usb->com->pic(axe)

Status
Not open for further replies.

bloody-orc

New Member
I have a prolem:

If i connect my usb-Zserial connector betwean my laptop and picaxe, then my programm can't find the picaxe connected to it. as everything else works on that cable (com mouse, IRreciever ect) then i suspect that the signal is to weak and so the programm wont find the picaxe.

My objective now is to amplify the signal strenght in both directions.

I'm making a schematic so it's more clear
 
the schematic
 

Attachments

  • picaxe.jpg
    picaxe.jpg
    33.4 KB · Views: 629
I see no reason why that shouldn't work, the serial output 'should' be from +12V to -12V, and the PIC only needs about 0V to 3.5V? - RS232 to a PIC works fine like this. You can't use a MAX232 as that inverts the signal, you would need to place inverters on the 5V side both ways.
 
see! here's my problem my com gives me only +-8V and this it seems is not enaugh for my picaxe. so if i use the MAX chip, then where should i put another inverter? betwean com and max on max and pic?
 
Does the picaxe contain a max232 chip? Because from the datasheet, the threshold voltage is 1.xV. +-8V seems way more than sufficient to trigger it. Also, typical output voltage swing for the transmitter is +-8V, and I do usually get those figures, at least on my programmer, and still it works flawlessly on my laptop thru convertor.

Anyway, the point is, you may be chasing the wrong tail. Try another usb-to-serial convertor. There are known cases where certain models of convertors simply refused to work.
 
the picaxe does not contain a max chip. picaxe is just a preprogrammed pic16F88.

but if i can use a COM mouse with this is it still possible that it is not working?
 
As I said, there are convertors that have been known to refuse to work, and they are not faulty. They work with mices and a lot of all other stuffs just fine. My guess is that line capacitance may be the culprit.
 
every pic is programed with 20+ voltages so it does not damage the chip. if you use 20V as an input voltage then this will damage the chip
 
bloody-orc said:
every pic is programed with 20+ voltages so it does not damage the chip. if you use 20V as an input voltage then this will damage the chip
I edited my post above as I saw the voltage divider on the rx pin. Apologies on that. Anyway, like what many others have suggested, instead of blaming on usb version, voltages and such, the point we all want to make is that the problem is probably elsewhere.
 
unfortunately i have no other wire to test it with :( and noone will buy me anotherone either so right now i stick to the amp. how to make 12V out of 8V and -12V out of -8V
 
But still, the circuit looks damaging to the PIC as the negative voltages exceed the absolute maximum ratings of the PIC on the rx pin. This is not considered programming, the preprogrammed code is probably just a bootloader.

Anyway, if there are no other options, you may try out Nigel's method.
 
checkmate said:
But still, the circuit looks damaging to the PIC as the negative voltages exceed the absolute maximum ratings of the PIC on the rx pin.

It's not damaging at all!, the 22K resistor limits the current, and protection diodes in the PIC clip it to Vdd/Vss - it's a VERY comon technique, and is shown by MicroChip in various application notes.

This is not considered programming, the preprogrammed code is probably just a bootloader.

No to both! - the PICAxe is like a BASIC STAMP, it runs a BASIC interpreter, the PC connection just loads p-code in to EEPROM that the interpreter then reads an instruction at a time. This is why the PICAxe is very slow, just like a BASIC Stamp! - the PICAxe also has a very limited code space, as it only uses the internal data EEPROM in the PIC.
 
ok then must i put the inverter betwean picaxes serout and max232's Rin and anotherone betwean COM pin3(TXD) and maxes Tin? and what inverter and with what power suply? (i can get any power needed)
 
bloody-orc said:
ok then must i put the inverter betwean picaxes serout and max232's Rin and anotherone betwean COM pin3(TXD) and maxes Tin? and what inverter and with what power suply? (i can get any power needed)

You place the inverters on the PIC side of the MAX232, a simple NPN transistor and two resistors is all that's required for each inverter - they should be powered by the 5V PIC supply. You should also remove the two resistors currently connected to the serial input pin, they are no longer required with a 5V logic input.
 
shouldnt i amplyfy the voltage instead of making it smaller? anyhow how are those transistors going to be connected?`where those two resistors go? on to the base and the otherone?
 
i supose that you meal this:
 

Attachments

  • inverter_101.jpg
    inverter_101.jpg
    16.6 KB · Views: 237
bloody-orc said:
shouldnt i amplyfy the voltage instead of making it smaller? anyhow how are those transistors going to be connected?`where those two resistors go? on to the base and the otherone?

The PIC requires 0/5V, nothing else! - making it larger will only cause the protection diodes to clip the signal to Vdd and Vss - which unless it's current limited will kill the PIC!.

However, there's no reason to suppose that the existing circuit shouldn't work perfectly, it's only your plan to try adding a MAX232. If you have a scope, try scoping the signal on the PIC.

You've already answered the resistor question yourself :lol:
 
well i'll try it out. if it works i cheer for 10 mins if it douesn't i cry for 10 minutes, then blow my nose and cry a bit more.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top