Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC CCS - What is the t serial and clock commands?

Status
Not open for further replies.

vedo35

Member
Hi guys i made for my pic mcu`s a kind of led development borad ( or a led driver board ) from
ST16cp05 led driver. This ic have serial in and parallel out (16 bit). I am trying to control of led outs. For example led 1 and 5 will burn. But this ic use serial interface. Clock , sdi (serial data in) en Latch enable. i have ccs compiler my question is: What or which commands do i have to write for my pic 16f877. For example porc 0 will be CLOCK , portc 1 SDI and portc 2 will be LE. Can you help me please? Cheersssss.
 
Last edited:
From the datasheet
. The STP16CP05 contains a
16-bit serial-in, parallel-out shift register that
feeds a 16-bit,

To send 16 bits to the device you need to clock in 16 serial bits then toggle the latch to move the bits from the shift register.

To clock in a bit you first set the spi pin to the bit value then toggle the clock pin.

The is also an output enable OE pin that is active low. The clock and latch do not have a bar over their names so the are active high.

See Table 6. "Recommended operating conditions" for min clock and data pulse width.

You should be able to use the built in CCS SPI stuff. Here is an example. But the code is so easy to write that you may waste more time understanding and setting up the CCS SPI stuff then it takes to code it.
 
ohh ok thanks for answer. I saw similar like this code i thought this command rule for rs-232 or serial eprom. So i will do same as rs-232 or serial eprom commands. But do i have to erase baut rete ? Thanks again.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top