Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Communication PC, not use MAX232!

Status
Not open for further replies.

member_tdh

Member level 5
Joined
Feb 6, 2006
Messages
86
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,187
opto max232

Hi all member!

Now, I want to communication with PC by Serial Port, NOT USE MAX232.
Has anybody any idea?
Could anybody share experience...? Thanks!
:idea:
 

serout n9600 max232

So Design your own converter (rs232/TTL). Or use optocoupler.
 

Hi!
I want to program for TxD,RxD pins throught opto-coupler (not used MAX232).
What things i've to do, pls help me!?!
 

Some transistors + resistors could do the same... Google it.
 

member_tdh said:
Hi all member!

Now, I want to communication with PC by Serial Port, NOT USE MAX232.
Has anybody any idea?
Could anybody share experience...? Thanks!
:idea:

Just a thought, have you ever tried to help anyone else or always just "I want"
 

Have you checked the ELM web site. They have a nice design. Also ATMEL got some good design on their programming tools.
Check both of them.
 

Hi!

Thanks for your help!

I'm studying this solution...!
 

member_tdh said:
Hi all member!

Now, I want to communication with PC by Serial Port, NOT USE MAX232.
Has anybody any idea?
Could anybody share experience...? Thanks!
:idea:

Just fine as long as your micro can accept more than 5V of voltages.
 

It depends that what type of function is required? I have used transistors not max in my atmel programmer.
 

sn_burki said:
It depends that what type of function is required? I have used transistors not max in my atmel programmer.

Now this is something different.
 

We can certainly use a pair of transistors for the purpose of level changing, but if you need isolation then use some opto as well. I have used these circuits in a number of products.
 

I have done many projects, communicating with PC from a PIC direct with only a 22K resistor in the TX line and a 1K in the RX line with success, one thing to remember is, a PC send and receive in reverse polarity "Driven Inverted",
thanks to current RS-232 implementation and the excellent I/O specifications of the PICmicro, most applications don't require level converters. Rather, inverted TTL (N300..N9600) can be used. A current limiting resistor is suggested (RS-232 is suppose to be short-tolerant)
 

    member_tdh

    Points: 2
    Helpful Answer Positive Rating
chrismicro said:
I have done many projects, communicating with PC from a PIC direct with only a 22K resistor in the TX line and a 1K in the RX line with success, one thing to remember is, a PC send and receive in reverse polarity "Driven Inverted",
thanks to current RS-232 implementation and the excellent I/O specifications of the PICmicro, most applications don't require level converters. Rather, inverted TTL (N300..N9600) can be used. A current limiting resistor is suggested (RS-232 is suppose to be short-tolerant)

This may work for most of today's PC. For some old ones, it still required high threadhold...
 

    member_tdh

    Points: 2
    Helpful Answer Positive Rating
funnynypd said:
chrismicro said:
I have done many projects, communicating with PC from a PIC direct with only a 22K resistor in the TX line and a 1K in the RX line with success, one thing to remember is, a PC send and receive in reverse polarity "Driven Inverted",
thanks to current RS-232 implementation and the excellent I/O specifications of the PICmicro, most applications don't require level converters. Rather, inverted TTL (N300..N9600) can be used. A current limiting resistor is suggested (RS-232 is suppose to be short-tolerant)

This may work for most of today's PC. For some old ones, it still required high threadhold...

I used it on an old XT using QBasic programming, with success, RS232 is RS232 is RS232, a pity new PC's come without RS232, anybody out there still using XT or older PC's? I don't think so.
 

member_tdh said:
Hi all member!

Now, I want to communication with PC by Serial Port, NOT USE MAX232.
Has anybody any idea?
Could anybody share experience...? Thanks!
:idea:

what is the other end of rs232..??
i think you must have to connect the voltage converter (which will make the data compatible for both the side.)..
 

Here is the software for a gate control system that is running now for two years where the PIC communicate with a PC and the I/O is connected to the RS232 port of the PC with only a 22K and a 1K current limiting resistors in the I/O lines, my apologies for the comments in Afrikaans but if someone is interested I will translate and post it.
Code:
'****************************************************************
'*  Name    : Gate.BAS                                          *
'*  Author  : Chris Bezuidenhout                                *
'*  Notice  : Copyright (c) 2005 Micro Developments             *
'*          : All Rights Reserved                               *
'*  Date    : 2005/09/17                                        *
'*  Version : 1.0                                               *
'*  Notes   :                                                   *
'*  URL     :[I]**broken link removed**[/I]            *
'****************************************************************
        INCLUDE "modedefs.bas"          ' Include serial modes

	DEFINE 	OSC		4		' Set IRC Frequency
	DEFINE DEBUG_BAUD 2400 
	DEFINE DEBUG_MODE 1
    DEFINE DEBUG_REG PORTA
    DEFINE DEBUG_BIT 3
     
Fam1         var  byte
Fam2         var  byte
CRC1         var  byte
CRC2         var  byte
Code1        var  byte[6]    'aray variable met 6 komponente
Q1           var  byte
Flag         var  byte
Excess       var  byte
X            var  byte
W            var  byte
rxbyte       var  byte
txbyte       var  byte
Gate         var  byte
Hek1         var  PORTB.3
Hek2         var  PORTB.4
Lees1        var  PORTb.2
Lees2        var  PORTB.0 
GRN1         var  PORTA.0
Rooi1        var  PORTA.1
GRN2         var  PORTB.6
Rooi2        var  PORTB.7
Dout         var  PORTb.1  'verander terug na A.3
Din          var  PORTb.3  'verander terug na A.4

' 	CMCON = 7            'Set port a to general I/O on 16F628
	
'	TRISA = %00110100
'	TRISB = %00000011
	TRISA = %00100000
	TRISB = %00000010      '******************************vernder bit 7 na 0
'       OPTION_REG = $7f        ' Enable PORTB pullups
      
    
    pause 500
'    test:
'    hek2 = %1                       'Rooi LED af
'    pause 200
'    hek2 = %0
'    pause 200
''    low grn2
''    high rooi2
''    low hek2
''    pause 100      
''    portb = 255
''    porta = 255
''    pause 200
''    portb = 0
''    porta = 0
''    pause 200
'    goto test
   
Main:
    LOW rooi1
    HIGH grn1
    Hek1 = %0
    Hek2 = %0
    High rooi2
    low grn2
    Fam1=$FF
    Fam2=$FF
    crc1=$FF
    Excess=$FF
    for x=0 to 5
    code1[X]=$FF
    next x
    OWOUT Lees1,%001,[$33]                 'Stuur 33 HEX na adres 1 om IButton in transmit mode te sit
    OWIN Lees1,%000,[Fam1,STR Code1\6,crc1] 'Lees IButton se kode
 '***************************haal uiit
' if portb.7 =0 then  
'    for x = 0 to 6
'        lookup x,[$E4,$1C,$31,$46,$0F,$00,$00],w   'Control iButton code witte
''        lookup x,[$dd,$85,$42,$0e,0,0],w   'Control iButton code Barry
'        'write x,w
'        code1[X]=w
'     Next x
'     else
'     goto main
'     endif
'     fam1=$01
 '***********************************************    
    if fam1=$01 then Gate1
    OWOUT Lees2,%001,[$33]                 'Stuur 33 HEX na adres 1 om IButton in transmit mode te sit
    OWIN Lees2,%000,[Fam2,STR Code1\6,crc1] 'Lees IButton se kode
'     for x = 1 to 10
'     serout DOUT,N2400,["A",code1[5],code1[4],code1[3],code1[2],code1[1],code1[0],crc1] 
'     next x
'     pause 1000
'     goto main
           
                       'Gebruik famielie kode as flag dat iButton teenwoordig is
   if fam2=$01 then Gate2 
    '2400 Baud word hier gebruik in omgekeerde polariteit "N2400", "T2400" as jy met ander PIC kommunikeer
    'maar ek beveel 20MHz aan vir hoer baud rate maar sal werk op 9600 met 4MHz
    
'    Serin DIN,N2400,1000,main,["SS"],Excess   '"SS" is stelsel se ID en kan verander vir ander stelsel
'                                                  'maar moet ook verander in program wat op PC loop
'    if Excess ="X" then gate2      'As "X" ontvang is, is iButton geldig en word toegang verleen
    goto Main                      'Loop if iButton not present
'END
Gate1:
' for x=1 to 3        'indien kode per radio gestuur word is dit beter om drie keer te stuur
'Stuur kode na PC program om gebruiker te identifiseer, "STR Code1" aray word hier
'opgebreek en 6 komponente afsonderlik in tru orde na PC program gestuur + CRC byte
for x = 5 to 0 step -1
    write x,code1(x)
    next x
    serout DOUT,N2400,[1,code1[5],code1[4],code1[3],code1[2],code1[1],code1[0],crc1]
'    serout2 Dout,16780,[1,hex2 code1[5],hex2 code1[4],hex2 code1[3],hex2 code1[2],hex2 code1[1],hex2 code1[0],hex2 crc1] 
'   next x
'      debug 1,HEX code1[5],HEX2 code1[4],HEX2 code1[3],HEX2 code1[2],HEX2 code1[1],HEX2 code1[0],HEX2 crc1
Acnlg1:

    Serin DIN, N2400, 1000, main,["SS"],Excess    'Wag hier vir data vanaf PC om toegang te verleen

     Select case excess
     Case "A"
     goto acnlg1
     case "D"
     goto Buzzer           'Skakel Buzzer aan indien iButton nie erken is nie
     case "E"
GLED1:

     
    Hek1 = %1                         'Skakel relay om hek oop te maak
    high rooi1                         'Groen LED aan
    low grn1                          'Rooi LED af
    pause 3000                           'wag 3 sekondes
'
RLED1:
                       
    Hek1 = %0                         'Los relay om hek te sluit nadat mikro gepuls is
    LOW rooi1                          'Groen LED af
    HIGH grn1                         'Rooi LED aan
    case else
    GOTO MAIN
    end select
    goto main                            'Keer terug na main loop
'******************Indien tweede hek benodig word****************
Gate2:
 
   serout DOUT,N2400,[2,code1[5],code1[4],code1[3],Code1[2],code1[1],code1[0],crc1] 


Acnlg2:

    Serin DIN,N2400, 1000, main,["SS"],Excess    'Wag hier vir data vanaf PC om toegang te verleen
'goto Main     
     Select case excess
     Case "A"
     Excess =$FF
     goto acnlg2
     case "D"
     goto Buzzer           'Skakel Buzzer aan indien iButton nie erken is nie
     case "E"
GLED2:
'test:
    hek2 = %1
'    low rooi2
'    High grn2                       'Rooi LED af
    pause 3000
    hek2 = %0
    high rooi2
    low grn2
''    low grn2
''    high rooi2
''    low hek2
''    pause 100      
''    portb = 255
''    porta = 255
''    pause 200
''    portb = 0
''    porta = 0
''    pause 200
'    goto test 
                         'Los relay om hek te sluit nadat mikro gepuls is
    LOW rooi2                        'Groen LED af
    HIGH grn2                           'Rooi LED aan
    case else
    GOTO MAIN
    end select
    goto main    
'****************************************************************
 Buzzer:
 for X = 1 to 5
 
     high rooi1
    low grn1
    pause 250
        LOW rooi1
    HIGH grn1
   next x
       goto Main
 
    end
   data "SS"              'EEPROM data stelsel ID

Added after 3 minutes:

I will upload the VB code on demand
 

member_tdh said:
Hi all member!

Now, I want to communication with PC by Serial Port, NOT USE MAX232.
Has anybody any idea?
Could anybody share experience...? Thanks!
:idea:

please visit the following link..

-->> **broken link removed**
-->> **broken link removed**

here you will get info as per your requirements..
cheers...:D
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top