goldcard


Closed Thread
Results 1 to 4 of 4

Thread: goldcard

  1. #1
    Join Date
    Jan 2005
    Posts
    15

    Default goldcard

    hello,
    first post ever,
    i am trying to write a goldcard program ( PIC16F84)
    communication between 18F4525 and card,
    the program in the card wait for a string of 16 bytes and answer with a 16 bytes string.
    the 16F84 never answer ??.

    replacing the card by a pc with hypert. and it works fine - even at 9600bp so soft in 4525 seems ok.

    cardsoft prog for info
    what's the mistake ???
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    tiger_bel,

    A few things but probably (or should I say definitely) not all....

    Your attached program does not compile without errors for the 16F84 - how did you test it?

    Variables temp and temp1 used in loops not declared – add
    temp var byte
    temp1 var byte

    your program uses Call to get to your Basic subroutines. Call looks for ASM code. For example, Call del100ms looks for an ASM routine marked _del100ms. You probably want to change them to Gosub

    Your Pauseus 1 really is not 1 us but 24 uS. See manual. Change to @ nop

    Maybe other can see more, especially in regards to the serial part – off to work for me (and I will look later tonight at your logic).

    Paul Borgmeier
    Salt Lake City, Utah
    USA

  3. #3
    Join Date
    Jan 2005
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    thanks for the tips.
    temp - lost by cut and paste !!
    already implemented and tested.

    some remarks anyway....

    for the pic 4525 sending to goldcard one stream of 16 bytes takes 133,2 ms on the ossiloscope.
    the pic 16F84 use the same oscillator of 4 mhz ( RB6/ osc) on the chipcard, and the same program but serin masked out - pic will send always the answer .
    The same stream takes 149,6 ms , there is no match in the baudrate. why ?
    it is not the pause between bytes send , normally 1 stopbit.
    The difference is in each bit send. one byte takes 9,25ms.
    i see a difference in high and low time for $55 - normally it must be a square wave !( for 4 periods at least )

    I did'nt read this remark in another topic on the board

    regards
    Harry

  4. #4
    Join Date
    Jan 2005
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    problem solved.... (how stuped)

    set the configuration bit osc HS insteed of XT
    and reading ,writing - all ok...
    up to the next problem ....

    thanks for the help
    regards

    harry

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