Hello people,
got a question for one of my projects. I'm using the PIC18F87J11 for a project and i need to make a shift register. I'll use 3 "normal" I/O lines for creating one. First line for data, second for a clock and third for enable. The lines are directly connected to a CPLD (simplified FPGA), which implemeted a shift register an that part is already working.
Now i'll have to write code in C (beacause my hole project is in C) to create those 3 lines which will drive the shift register (in the CPLD).
I can create clock signals by setting the output high, wait for a while, setting the output low and soo on. But is there a smarter way to do it?
And how can i create a 8 bit serial bit stream? maybe with some shift left/right instructions?
Please help me by solving this problem. Thank You !
got a question for one of my projects. I'm using the PIC18F87J11 for a project and i need to make a shift register. I'll use 3 "normal" I/O lines for creating one. First line for data, second for a clock and third for enable. The lines are directly connected to a CPLD (simplified FPGA), which implemeted a shift register an that part is already working.
Now i'll have to write code in C (beacause my hole project is in C) to create those 3 lines which will drive the shift register (in the CPLD).
I can create clock signals by setting the output high, wait for a while, setting the output low and soo on. But is there a smarter way to do it?
And how can i create a 8 bit serial bit stream? maybe with some shift left/right instructions?
Please help me by solving this problem. Thank You !