Advertisement
TokioHotel

Untitled

Mar 21st, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. void AD8555_BitSend(uint8_t Bit)
  2. {
  3.     NOP_Delay(150); // ~20µs (Width between Pulses, >=10µs)    
  4.     HAL_GPIO_WritePin(GPIOA, GAIN_SEL_Pin, GPIO_PIN_SET);
  5.     if(Bit)
  6.     {
  7.       NOP_Delay(600);   // ~85µs (Pulse Width for Loading 1 into Shift Register, >=50µs)
  8.     }
  9.     else
  10.     {
  11.       NOP_Delay(40);   // ~6µs (Pulse Width for Loading 0 into Shift Register, Range between 50 ns and 10µs )
  12.     }        
  13.     HAL_GPIO_WritePin(GPIOA, GAIN_SEL_Pin, GPIO_PIN_RESET);    
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement