--- snip ---

Hi Melanie,

I did seen your magnetic card reader program on the WEB.
I just wondering if u can help me and tell me how can i store cards what was readed in to one external memory like I2C and after that to can read with one computer to RS232 interface

In fact i need to know what instruction is supouse to add in yur profram to do that.

That aplication is need for one Control Access Solution, and im new and very unfamiliarized with PIC programming and i request your help if u have time and if u can help with that.

--- snip ---

Firstly, let's try to keep requests on-list.

In case anyone is wondering what we're talking about here, it's this program...

http://www.melabs.com/resources/samp...ed/MagCard.txt

What you also need to know is Microchip Datasheet AN727 which is found here...

http://ww1.microchip.com/downloads/e...tes/00727a.pdf

Now here's one example of how to modify to output to PC/RS232 (there are many other ways of doing it with SEROUT or HSEROUT for example)... The result of the card read is stored in a buffer called MagData which is 40 bytes deep. The section I'm modifying is located at the end of my original program...

If MagError<>0 then
'
' Blink LED ten times rapidly to indicate Bad Read
' ------------------------------------------------
For CounterA=1 to 10
Low GreenLED:Pause 50
High GreenLED:Pause 50
Next CounterA
else
'
' Blink LED slowly to indicate Good Read
' --------------------------------------
Pause 500:Low GreenLED:Pause 500:High GreenLED
DEBUG REP $00\16,13,10
FOR COUNTERA=0 to 39
DEBUG HEX2 MAGDATA[COUNTERA]
NEXT COUNTERA
DEBUG 13,10
endif

I'll let you sort out the details of baud-rate etc to suit your own requirements and ponder why I've used HEX output and a For-Next loop rather than use the apparantly simpler STR expression.

As for writing to I2C, easy enough too... but rather than have me do all your homework, I think you should get familiar with PICBasic and do some programming yourself.

Melanie