Dear sir,
I have an appln wherer i have to read 4 line status connected to 74hc165 as 4 parallel i/p.i have interfaced this IC to PIC micro.Basically i am using 3 pins ....1) CP 2) PL 3) Q7.
CE pin is gnd.Could anyone has sample C code.My understanding to read 4 line status is steps as below:
1) CLK -> HIGH
2) PL -> LOw
3) PL-> HIGH
4) repeat in loop 4times ....
a) read the pin value and shift the result in a read165 variable.
b) CLK -> LOW
c) CLK -> HIGH
5) PL -> LOW
6) Now analyze the status.
pls review and help ..
regards,
arp
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
Posted: Mon Dec 24, 2007 6:41 am
The steps you describe above are very easy to translate into a program, basically every line in your sequence equals to a single C command.
So, you bought a C compiler but don't know how to program in C? Sounds like a school assignment. I can help you by giving an example program but then you would be coming back for every little change again and again. Sorry, but the best way for everybody is when you try to learn C first.
arup Guest
Posted: Mon Dec 24, 2007 10:36 pm
ckielstra!!
already used 2 c compilers . yes me new to pic micro.but not to C.......
hope this will hep u in giving further suggestions
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