芯片解密,芯片破解,IC解密,单片机解密,MCU解密,STM解密

飞芯科技提供芯片解密,芯片破解,IC解密,单片机解密,MCU解密,STM解密逆向服务

软件开发PMC234+AT24C01程序源码

软件开发单片机源程序如下:


  1. #include        "extern.h"
  2. /***********************************************************************************************/
  3. void at24cxx_Delay_5us( void );
  4. void at24cxx_Delay_10us( void );
  5. void at24cxx_Delay_10ms( void );
  6. void AT24CXX_IO_Init( void );
  7. void AT24CXX_CLK_LOW( void );
  8. void AT24CXX_CLK_HIGH( void );
  9. void AT24CXX_IO_LOW( void );
  10. void AT24CXX_IO_HIGH( void );
  11. void at24cxx_IO_input( void );
  12. void at24cxx_IO_ouput( void );
  13. void at24cxx_Start( void );
  14. void at24cxx_Stop( void );
  15. void at24cxx_SEND_ACK( void );
  16. void at24cxx_SEND_NACK( void );
  17. void at24cxx_RECV_ACK( void );
  18. void at24cxx_Recv_Char( void );
  19. void at24cxx_Send_Char( void );
  20. void read_Random_Byte( void );
  21. void write_Random_Byte( void );
  22. void read_eeprom_configuration( void );
  23. void write_eeprom_configuration( void );
  24. /***********************************************************************************************/
  25. void        FPPA0 (void)
  26. {
  27.         .ADJUST_IC        SYSCLK=IHRC/2, IHRC=16MHz, VDD=5V, Bandgap=On;

  28.         //        Insert Initial Code
  29.         AT24CXX_IO_Init();
  30.         while (1)
  31.         {
  32. //                ...
  33. //                wdreset;
  34.                 read_eeprom_configuration();
  35.                 write_eeprom_configuration();
  36.         }
  37. }

  38. void        FPPA1 (void)
  39. {
  40.         goto        $;
  41. }


  42. void        Interrupt (void)
  43. {
  44.         pushaf;

  45.         if (Intrq.T16)
  46.         {        //        T16 Trig
  47.                 //        User can add code
  48.                 Intrq.T16        =        0;
  49.                 //...
  50.         }

  51.         popaf;
  52. }

  53. /******************************************************/
  54. /***********************************************************************************************
  55. * \brief      This function is just used to generate some example data for write operations
  56. *             on the card.
  57. *
  58. **********************************************************************************************/
  59. void at24cxx_Delay_5us( void )
  60. {
  61.         .delay 100;
  62. }
  63. void at24cxx_Delay_10us( void )
  64. {
  65.         .delay 200;
  66. }
  67. void at24cxx_Delay_10ms( void )
  68. {
  69.         .delay 200;
  70.         .delay 200;
  71.         .delay 200;
  72.         .delay 200;
  73.         .delay 200;
  74. }
  75. /***********************************************************************************************/
  76. void AT24CXX_IO_Init( void )
  77. {
  78.         //SCL
  79.         PA.0 = 1;
  80.         PAC.0 = 1;
  81.         //SDA
  82.         PA.5 = 1;       
  83.         PAC.5 = 0;       
  84. }
  85. /***********************************************************************************************/
  86. void AT24CXX_CLK_LOW( void )
  87. {
  88.         PA.0 = 0;       
  89. }
  90. void AT24CXX_CLK_HIGH( void )
  91. {
  92.         PA.0 = 1;       
  93. }
  94. /***********************************************************************************************/
  95. void AT24CXX_IO_LOW( void )
  96. {
  97.         PA.5 = 0;       
  98. }
  99. void AT24CXX_IO_HIGH( void )
  100. {
  101.         PA.5 = 1;       
  102. }
  103. /***********************************************************************************************
  104. * \brief      This function is just used to generate some example data for write operations
  105. *             on the card.
  106. *
  107. **********************************************************************************************/
  108. void at24cxx_IO_input( void )
  109. {
  110.         PAC.5 = 0;       
  111. }
  112. void at24cxx_IO_ouput( void )
  113. {
  114.         PAC.5 = 1;
  115. }



联系方式

地址:石家庄市新华区民族路77号华强广场D座2009
电话:0311-88816616/87087811
手机:13315190088
传真:0311-67901001
联系人:张工
网址:www.taihedz.cn
邮箱:feixindz@163.com
微信:xinpianjiemi
QQ:527263666/568069805

在线客服
热线电话

企业微信