VSDSquadron Mini DataSheet

⌘K
  1. Home
  2. Docs
  3. VSDSquadron Mini DataShee...
  4. Projects
  5. Binary to Gray Code Converter using VSDSquadron Mini

Binary to Gray Code Converter using VSDSquadron Mini

1. LED’s Connection

  • LED1 (Gray Code Bit 2) connected to GPIO Pin_0
  • LED2 (Gray Code Bit 1) connected to GPIO Pin_2
  • LED3 (Gray Code Bit 0) connected to GPIO Pin_3

2. Buttons Connection

  • Button1 (Binary Input Bit 2) connected to GPIO Pin_4
  • Button2 (Binary Input Bit 1) connected to GPIO Pin_5
  • Button3 (Binary Input Bit 0) connected to GPIO Pin_6
#include <ch32v00x.h>

#include <debug.h>
int xor(int bit1, int bit2) 
{

 return bit1 ^ bit2;

}
void GPIO_Config(void) 
{

 // Configuration code for input and output GPIO pins

}
int main(void) 
{

 // Main loop for binary to Gray code conversion and output display

}

https://drive.google.com/file/d/12cUG2bix1QhM1PYhgAilZgHISEdt_eQs/view

https://github.com/kushaanbhat/somaiya-riscv