CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

How to write custom protocol

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Linuxbuilders



Joined: 20 Mar 2010
Posts: 193
Location: Auckland NZ

View user's profile Send private message

How to write custom protocol
PostPosted: Sun Jun 16, 2013 4:05 am     Reply with quote

Hey,
I need to write custom output protocol.

In short I will be driving outputs to stream wiegand protocol out.

I have no idea where to start. I know how wiegand works but I am not sure how to pass data to the functions.

I would create 2 functions/drivers: w_one(); and w_zero(); to map proper timing on Data and Strobe pins for logical 1 and logical 0.

Then how would I map it so I can pass my data to the function?
For example wiegand_out(DATA); which will be using above drivers?

here I would imagine this:
1. convert my byte to string of bits
2. send string of bits to output function
3. output function takes zero or one and brings up Data or Strobe as per wiegand standard

Any help on it?
Thnx in advance
_________________
Help "d" others and then you shell receive some help from "d" others.
temtronic



Joined: 01 Jul 2010
Posts: 9161
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Jun 16, 2013 5:31 am     Reply with quote

general comments..

first, search this forum and the code library for any 'hits' .Odds are you're not the only guy wanting to do this...

second, 'google' ! There will be a LOT of hits there as well.Maybe not in CCS C code but code is code...What is important is the timing specs, dta format,etc.By using the right 'keywords' Google might find a driver for you.

third, do you want to have your PIC mimic a card reader and send data to the host, or be the host and read data from the card reader? I've seen a lot of 'reading a card reader' code but not being a card reader.

4th, choose a PIC, build a prototype platform and program in the '1Hz flashing LED' and 'Hello PC' programs.This will confirm your hardware is working ! and you'll have a known starting point for the Wiegand interface/driver.

hth
jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group