Serial Communication Inverse mode


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1

    Default

    Quote Originally Posted by Joe S. View Post
    INVERSE means ? A. write the text backwards, B.send data inverted as opposed to true? , C.make the text appear as white blocks with text inside them? D. Other ?
    Please help us help you.
    First I would like to thank you, but I do not know how to answer you, since your kindness i would like to share opinions that maybe others can benefit from this topic.

    API used for the get correct ATR answers from Smart Cards (ISO 7816 standard)

    So I Need to build Application That I can Analyze Communication Protocols between Host and Card.

    Okay So I attached partial Code that it may help you to understand what I am doing
    Thanks Again.



    '/******setting Parameters **************************/

    DEFINE OSC 20 'LOCK 20 MHZs set HS in the configuration of the oscillator and to use pic from 20mhz!!!!!
    DEFINE SER2_BITS 9 'bit datas included control prity
    DEFINE I2C_SLOW 1 'lower velocity' it engages external eeprom (if clock> > 8 mhz)
    DEFINE I2C_HOLD 1
    adcon1=7 'set port.a all digital

    d VAR BYTE
    h VAR BYTE 'byte answered length Scard
    d1 VAR BYTE 'first byte loop launches
    d2 VAR BYTE 'last byte loop launches


    scsdin VAR WORD 'parameter for serin2 toward deco
    scsdou VAR WORD 'parameter for serout2 toward deco
    scssin VAR WORD 'parameter for serin2 toward slave
    scssou VAR WORD 'parameter for serout2 toward slave
    dlatr VAR WORD 'parameter for calculation stand still among the first byte and following of the atr

    '**********************************************
    '*list of pin configuration Of PIC16876 I/SP *
    '**********************************************

    dio VAR PORTB.0 ' 0 data i/o with the Edec Edec << >> deco

    '**********************************************
    Data $3F,$FF,$11,$00,$01,$40,$96,$71,$71,$77,$0e,$6c,$b 6,$d6,$00,$01

    Data $5a 'length command to be stopped in eeprom locals 32!!!!!!!! DON'T GO BEYOND 5a!!!!!!
    Data $00,$01 'answered Data to Edec >> 00 01
    Data $20,$51 '>>parameter for local serin2.35 from Edec >> $51-9600 bauds with 3,57 Mhz toward EDec (varying)
    Data $20,$81

    Read 35,scsdin.byte1 'it supports on tall byte of scsdin given in locals. 35 eeproms
    Read 36,scsdin.byte0 'it supports on low byte of scsdin given in locals. 36 eeproms
    Read 37,scssin.byte1 'it supports on tall byte of scssin given in locals. 37 eeproms
    Read 38,scssin.byte0 'it supports on low byte of scssin given in locals. 38 eeproms


    scsdou=scsdin+1 'serout2 verso Edeco=serin2+1
    scssou=scssin+1 'serout2 verso master=serin2+1
    dlatr=(scsdin.byte0*2) 'calculation break 3F of the atr compared to the baudrate




    'I want to get reaply from the Eprom Data inverse mode ?????????

    fase1: 'fase 1,validates atrs to the edec

    d1=0 'first byte atr
    d2=13 'last Byte atr

    d=d1 'it sends only first byte atr to edec
    Read d,h 'd=indicates eeprom invalid,h=data character character to be sent
    SerOut2 dio,scsdou,[h] 'options driven,true,even for serout2---9600,8,e,1 >> 8274
    PauseUs 80 'attend... .80.... ms' sends the other byte of the atr
    Pause dlatr
    Pause 140


    For d=d1+1 to d2 'loop of 15 cycle, first byte atr to edec
    Read d,h 'd=indicates eeprom inverse,h=data character character to be sent
    SerOut2 dio,scsdou,[h] 'options driven,true,even for serout2---9600,8,e,1 >>
    PauseUs 90
    Last edited by titanvision; - 27th October 2008 at 02:58.

Similar Threads

  1. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 20:31
  2. Wireless serial communication question
    By Ahmadabuomar in forum Serial
    Replies: 3
    Last Post: - 21st December 2009, 03:49
  3. PIC to PIC "wired" serial one-way communication - SERIN2/SEROUT2
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th April 2008, 20:02
  4. Serial communication PIC to PIC help.
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th January 2005, 15:45
  5. Replies: 8
    Last Post: - 11th November 2004, 20:08

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