口袋实验室--使用AD2高效调试IIC、UART、SPI等低速接口

目录

1. 简介

2. 调试过程

2.1 简要步骤

2.2 Si5338 寄存器配置流程

2.3 AD2的基本配置

2.4 检查Si5338状态

2.5 配置Si5338寄存器

2.6 保存Si5338寄存器

3. 总结


1. 简介

使用Digilent Analog Discovery 2进行调试不仅提升了工作效率,而且极大地简化了常见低速接口的分析过程。在众多低速接口中,I2C接口因其简洁的连接方式和广泛的应用场景而受到特别关注。本文将以I2C接口为例,深入探讨如何利用AD2高效地调试Si5338芯片,一个多用途、任意频率时钟发生器芯片。

I2C接口

I2C(Inter-Integrated Circuit)接口是一种高度灵活的通信协议,通过仅使用两条线(即数据线SDA和时钟线SCL)实现了多个设备间的数据传输。

Si5338芯片

Si5338 可以生成四个独立的时钟信号,每个输出时钟都可以独立配置以支持各种信号格式和供电电压。这使得它非常适合在有限空间内实现多频率合成。Si5338 具有极低的抖动性能。它广泛应用于网络、通讯、高性能计算等领域,特别是在需要精确时钟信号的场合。Si5338通过I2C接口进行配置和控制,可以灵活地设置输出频率、相位和其他参数,满足不同应用的需求。

2. 调试过程

2.1 简要步骤

连接设备:首先,将AD2的逻辑分析仪通道连接到Si5338芯片的I2C接口上,确保SDA和SCL线分别对应。可以利用AD2提供的电源功能给Si5338供电。

配置WaveForms软件:启动AD2随附的WaveForms软件,并配置逻辑分析仪工具以适应I2C协议的特定参数,如时钟速度等。WaveForms软件能够自动识别并解码I2C通信,大大简化了调试过程。

捕获和分析数据:在Si5338进行通信时,使用AD2捕获I2C总线上的数据。通过WaveForms软件,可以实时查看和分析数据传输过程,包括启动条件、地址帧、数据帧和停止条件等。

调试和优化:根据捕获的数据,可以对Si5338的配置进行调整和优化。如果发现通信错误或性能不佳的问题,可以通过分析I2C总线上的数据来定位问题源头,并进行相应的调整。

调试中的注意事项:

  • 确保AD2与Si5338之间的连接稳定可靠,避免在数据传输过程中出现干扰或误操作。
  • 注意观察I2C总线的电气特性,如上拉电阻的配置,以确保通信的稳定性和可靠性。

2.2 Si5338 寄存器配置流程

了解 Si5338 寄存器配置流程是接下来使用AD2进行调试的基础。

 

2.3 AD2的基本配置

需要开启两个功能模块:

  • Protocol,用于开启AD2的IIC物理层
  • Script,用于编写Javascript脚本,实现上一节所描述Si5338配置流程

2.4 检查Si5338状态

//Check Si5338 Status
clear();
print("start\n");

if (Protocol.I2C.Clear() != true) throw "I2C bus error. Check the pull-ups.";

var dev_addr   = 0x70;
var reg_addr   = 218;

var reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);

if ((reg_data & 0x10) == 0)
    print("PLL_LOL = 0, PLL is locked.\n");
else
    print("PLL_LOL = 1, PLL is loss of locked.\n");

if ((reg_data & 0x08) == 0)
    print("LOS_FDBK = 0, Present of Signal Feedback Input.\n");
else
    print("LOS_FDBK = 1, Loss Of Signal Feedback Input.\n");

if ((reg_data & 0x04) == 0)
    print("LOS_CLKIN = 0, Present of Signal Clock Input.\n");
else
    print("LOS_CLKIN = 1, Loss Of Signal Clock Input.\n");

if ((reg_data & 0x01) == 0)
    print("SYS_CAL = 0, PLL is in process of acquiring lock.\n");
else
    print("SYS_CAL = 1, PLL is not acquiring lock.\n");

print("end");

2.5 配置Si5338寄存器

//C0 - 125MHz, lvds
//C1 - 160MHz, lvds
//C2 - 100MHz, lvds
//C3 - 50MHz, lvds
clear();
print("start");

if (Protocol.I2C.Clear() != true) throw "I2C bus error. Check the pull-ups.";

var dev_addr   = 0x71;
var reg_addr   = 0   ;
var reg_data   = 0   ;
var reg_data_t = 0   ;
var curr = new Array(3);

var reg_store = [
[  0,0x00,0x00],
[  1,0x00,0x00],
[  2,0x00,0x00],
[  3,0x00,0x00],
[  4,0x00,0x00],
[  5,0x00,0x00],
[  6,0x08,0x1D],
[  7,0x00,0x00],
[  8,0x70,0x00],
[  9,0x0F,0x00],
[ 10,0x00,0x00],
[ 11,0x00,0x00],
[ 12,0x00,0x00],
[ 13,0x00,0x00],
[ 14,0x00,0x00],
[ 15,0x00,0x00],
[ 16,0x00,0x00],
[ 17,0x00,0x00],
[ 18,0x00,0x00],
[ 19,0x00,0x00],
[ 20,0x00,0x00],
[ 21,0x00,0x00],
[ 22,0x00,0x00],
[ 23,0x00,0x00],
[ 24,0x00,0x00],
[ 25,0x00,0x00],
[ 26,0x00,0x00],
[ 27,0x71,0x80],
[ 28,0x15,0xFF],
[ 29,0x90,0xFF],
[ 30,0xB0,0xFF],
[ 31,0xC0,0xFF],
[ 32,0xC0,0xFF],
[ 33,0xC0,0xFF],
[ 34,0xC0,0xFF],
[ 35,0xAA,0xFF],
[ 36,0x06,0x1F],
[ 37,0x06,0x1F],
[ 38,0x06,0x1F],
[ 39,0x06,0x1F],
[ 40,0x84,0xFF],
[ 41,0x10,0x7F],
[ 42,0x24,0x3F],
[ 43,0x00,0x00],
[ 44,0x00,0x00],
[ 45,0x00,0xFF],
[ 46,0x00,0xFF],
[ 47,0x14,0x3F],
[ 48,0x2A,0xFF],
[ 49,0x05,0xFF],
[ 50,0xC4,0xFF],
[ 51,0x07,0xFF],
[ 52,0x10,0xFF],
[ 53,0x00,0xFF],
[ 54,0x08,0xFF],
[ 55,0x00,0xFF],
[ 56,0x00,0xFF],
[ 57,0x00,0xFF],
[ 58,0x00,0xFF],
[ 59,0x01,0xFF],
[ 60,0x00,0xFF],
[ 61,0x00,0xFF],
[ 62,0x00,0x3F],
[ 63,0x10,0xFF],
[ 64,0xD0,0xFF],
[ 65,0x05,0xFF],
[ 66,0x00,0xFF],
[ 67,0x00,0xFF],
[ 68,0x00,0xFF],
[ 69,0x00,0xFF],
[ 70,0x08,0xFF],
[ 71,0x00,0xFF],
[ 72,0x00,0xFF],
[ 73,0x00,0x3F],
[ 74,0x10,0xFF],
[ 75,0x80,0xFF],
[ 76,0x0A,0xFF],
[ 77,0x00,0xFF],
[ 78,0x00,0xFF],
[ 79,0x00,0xFF],
[ 80,0x00,0xFF],
[ 81,0x01,0xFF],
[ 82,0x00,0xFF],
[ 83,0x00,0xFF],
[ 84,0x00,0x3F],
[ 85,0x10,0xFF],
[ 86,0x00,0xFF],
[ 87,0x17,0xFF],
[ 88,0x00,0xFF],
[ 89,0x00,0xFF],
[ 90,0x00,0xFF],
[ 91,0x00,0xFF],
[ 92,0x01,0xFF],
[ 93,0x00,0xFF],
[ 94,0x00,0xFF],
[ 95,0x00,0x3F],
[ 96,0x10,0x00],
[ 97,0x2A,0xFF],
[ 98,0x66,0xFF],
[ 99,0x08,0xFF],
[100,0x00,0xFF],
[101,0x00,0xFF],
[102,0x00,0xFF],
[103,0x03,0xFF],
[104,0x00,0xFF],
[105,0x00,0xFF],
[106,0x80,0xBF],
[107,0x00,0xFF],
[108,0x00,0xFF],
[109,0x00,0xFF],
[110,0x80,0xFF],
[111,0x00,0xFF],
[112,0x00,0xFF],
[113,0x00,0xFF],
[114,0x80,0xFF],
[115,0x00,0xFF],
[116,0x80,0xFF],
[117,0x00,0xFF],
[118,0x80,0xFF],
[119,0x00,0xFF],
[120,0x00,0xFF],
[121,0x00,0xFF],
[122,0x80,0xFF],
[123,0x00,0xFF],
[124,0x00,0xFF],
[125,0x00,0xFF],
[126,0x00,0xFF],
[127,0x00,0xFF],
[128,0x00,0xFF],
[129,0x00,0x0F],
[130,0x00,0x0F],
[131,0x00,0xFF],
[132,0x00,0xFF],
[133,0x00,0xFF],
[134,0x00,0xFF],
[135,0x00,0xFF],
[136,0x00,0xFF],
[137,0x00,0xFF],
[138,0x00,0xFF],
[139,0x00,0xFF],
[140,0x00,0xFF],
[141,0x00,0xFF],
[142,0x00,0xFF],
[143,0x00,0xFF],
[144,0x00,0xFF],
[145,0x00,0x00],
[146,0xFF,0x00],
[147,0x00,0x00],
[148,0x00,0x00],
[149,0x00,0x00],
[150,0x00,0x00],
[151,0x00,0x00],
[152,0x00,0xFF],
[153,0x00,0xFF],
[154,0x00,0xFF],
[155,0x00,0xFF],
[156,0x00,0xFF],
[157,0x00,0xFF],
[158,0x00,0x0F],
[159,0x00,0x0F],
[160,0x00,0xFF],
[161,0x00,0xFF],
[162,0x00,0xFF],
[163,0x00,0xFF],
[164,0x00,0xFF],
[165,0x00,0xFF],
[166,0x00,0xFF],
[167,0x00,0xFF],
[168,0x00,0xFF],
[169,0x00,0xFF],
[170,0x00,0xFF],
[171,0x00,0xFF],
[172,0x00,0xFF],
[173,0x00,0xFF],
[174,0x00,0xFF],
[175,0x00,0xFF],
[176,0x00,0xFF],
[177,0x00,0xFF],
[178,0x00,0xFF],
[179,0x00,0xFF],
[180,0x00,0xFF],
[181,0x00,0x0F],
[182,0x00,0xFF],
[183,0x00,0xFF],
[184,0x00,0xFF],
[185,0x00,0xFF],
[186,0x00,0xFF],
[187,0x00,0xFF],
[188,0x00,0xFF],
[189,0x00,0xFF],
[190,0x00,0xFF],
[191,0x00,0xFF],
[192,0x00,0xFF],
[193,0x00,0xFF],
[194,0x00,0xFF],
[195,0x00,0xFF],
[196,0x00,0xFF],
[197,0x00,0xFF],
[198,0x00,0xFF],
[199,0x00,0xFF],
[200,0x00,0xFF],
[201,0x00,0xFF],
[202,0x00,0xFF],
[203,0x00,0x0F],
[204,0x00,0xFF],
[205,0x00,0xFF],
[206,0x00,0xFF],
[207,0x00,0xFF],
[208,0x00,0xFF],
[209,0x00,0xFF],
[210,0x00,0xFF],
[211,0x00,0xFF],
[212,0x00,0xFF],
[213,0x00,0xFF],
[214,0x00,0xFF],
[215,0x00,0xFF],
[216,0x00,0xFF],
[217,0x00,0xFF],
[218,0x00,0x00],
[219,0x00,0x00],
[220,0x00,0x00],
[221,0x0D,0x00],
[222,0x00,0x00],
[223,0x00,0x00],
[224,0xF4,0x00],
[225,0xF0,0x00],
[226,0x00,0x00],
[227,0x00,0x00],
[228,0x00,0x00],
[229,0x00,0x00],
[231,0x00,0x00],
[232,0x00,0x00],
[233,0x00,0x00],
[234,0x00,0x00],
[235,0x00,0x00],
[236,0x00,0x00],
[237,0x00,0x00],
[238,0x14,0x00],
[239,0x00,0x00],
[240,0x00,0x00],
[242,0x02,0x02],
[243,0xF0,0x00],
[244,0x00,0x00],
[245,0x00,0x00],
[247,0x00,0x00],
[248,0x00,0x00],
[249,0xA8,0x00],
[250,0x00,0x00],
[251,0x84,0x00],
[252,0x00,0x00],
[253,0x00,0x00],
[254,0x00,0x00],
[255, 1, 0xFF], // set page bit to 1 
[  0,0x00,0x00],
[  1,0x00,0x00],
[  2,0x00,0x00],
[  3,0x00,0x00],
[  4,0x00,0x00],
[  5,0x00,0x00],
[  6,0x00,0x00],
[  7,0x00,0x00],
[  8,0x00,0x00],
[  9,0x00,0x00],
[ 10,0x00,0x00],
[ 11,0x00,0x00],
[ 12,0x00,0x00],
[ 13,0x00,0x00],
[ 14,0x00,0x00],
[ 15,0x00,0x00],
[ 16,0x00,0x00],
[ 17,0x01,0x00],
[ 18,0x00,0x00],
[ 19,0x00,0x00],
[ 20,0x90,0x00],
[ 21,0x31,0x00],
[ 22,0x00,0x00],
[ 23,0x00,0x00],
[ 24,0x01,0x00],
[ 25,0x00,0x00],
[ 26,0x00,0x00],
[ 27,0x00,0x00],
[ 28,0x00,0x00],
[ 29,0x00,0x00],
[ 30,0x00,0x00],
[ 31,0x00,0xFF],
[ 32,0x00,0xFF],
[ 33,0x01,0xFF],
[ 34,0x00,0xFF],
[ 35,0x00,0xFF],
[ 36,0x90,0xFF],
[ 37,0x31,0xFF],
[ 38,0x00,0xFF],
[ 39,0x00,0xFF],
[ 40,0x01,0xFF],
[ 41,0x00,0xFF],
[ 42,0x00,0xFF],
[ 43,0x00,0x0F],
[ 44,0x00,0x00],
[ 45,0x00,0x00],
[ 46,0x00,0x00],
[ 47,0x00,0xFF],
[ 48,0x00,0xFF],
[ 49,0x01,0xFF],
[ 50,0x00,0xFF],
[ 51,0x00,0xFF],
[ 52,0x90,0xFF],
[ 53,0x31,0xFF],
[ 54,0x00,0xFF],
[ 55,0x00,0xFF],
[ 56,0x01,0xFF],
[ 57,0x00,0xFF],
[ 58,0x00,0xFF],
[ 59,0x00,0x0F],
[ 60,0x00,0x00],
[ 61,0x00,0x00],
[ 62,0x00,0x00],
[ 63,0x00,0xFF],
[ 64,0x00,0xFF],
[ 65,0x01,0xFF],
[ 66,0x00,0xFF],
[ 67,0x00,0xFF],
[ 68,0x90,0xFF],
[ 69,0x31,0xFF],
[ 70,0x00,0xFF],
[ 71,0x00,0xFF],
[ 72,0x01,0xFF],
[ 73,0x00,0xFF],
[ 74,0x00,0xFF],
[ 75,0x00,0x0F],
[ 76,0x00,0x00],
[ 77,0x00,0x00],
[ 78,0x00,0x00],
[ 79,0x00,0xFF],
[ 80,0x00,0xFF],
[ 81,0x00,0xFF],
[ 82,0x00,0xFF],
[ 83,0x00,0xFF],
[ 84,0x90,0xFF],
[ 85,0x31,0xFF],
[ 86,0x00,0xFF],
[ 87,0x00,0xFF],
[ 88,0x01,0xFF],
[ 89,0x00,0xFF],
[ 90,0x00,0xFF],
[ 91,0x00,0x0F],
[ 92,0x00,0x00],
[ 93,0x00,0x00],
[ 94,0x00,0x00],
[255, 0, 0xFF] ]; // set page bit to 0
//End of file

//Disable all outputs; Set OEB_ALL = 1; reg230[4];
print("Disable all outputs");
reg_addr = 230;
reg_data = 0x10;
Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);

//Pause LOL; Set DIS_LOL = 1; reg241[7];
print("Pause PLL loss of lock detect.");
reg_addr = 241;
reg_data = 0xE5;
Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);

//Write register map;
print("Writing register map.");
for (var i = 0; i < 350-1; i++) {
    curr = reg_store[i];
    if (curr[2] != 0x00) {
        //do a read-modify-write
        reg_addr = curr[0];
        reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]); // read current value
        reg_data = reg_data & ~curr[2]; //clear current value
        reg_data = reg_data | (curr[1] & curr[2]); //set new value
        Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);
    }
}

// check LOS alarm for the xtal input
// on IN1 and IN2 (and IN3 if necessary)
reg_addr = 218;
reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
reg_data = reg_data & 0x04;
while (reg_data != 0) {
    reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
    reg_data = reg_data & 0x04;
}
print("Xtal input exists.");

//FCAL_OVRD_EN = 0
print("Disable override Frequency Calibration.");
reg_addr = 49;
reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
reg_data = reg_data & 0x7F;
Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);

//Soft reset
print("Soft reset");
reg_addr = 246;
reg_data = 0x02;
Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);

//DIS_LOL = 0
print("Continue PLL loss of lock detect");
reg_addr = 241;
reg_data = 0x65;
Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);

//Wait 25ms
wait(0.025);

//Make sure the device locked by checking PLL_LOL and SYS_CAL
reg_addr = 218;
reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
reg_data = reg_data & 0x15;
while (reg_data != 0) {
    reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
    reg_data = reg_data & 0x15;
}
print("PLL is locked and acquiring lock completed");

//Copy FCAL value to active registers
print("Copy FCAL value to active registers");
reg_addr = 235;
reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
reg_addr = 45;
Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);

reg_addr = 236;
reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
reg_addr = 46;
Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);

reg_addr   = 237;
reg_data   = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
reg_addr   = 47;
reg_data_t = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
reg_data   = (reg_data & 3) | (reg_data_t & 0xFC);
Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);

//Set PLL to FCAL values; Set FCAL_OVRD_EN = 1; reg49[7];
print("Set PLL to FCAL values, override Frequency Calibration for the VCO");
reg_addr = 49;
reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
reg_data = reg_data | 0x80;
Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);

//Enable Outputs; Set OEB_ALL = 0; reg 230[4];
print("Enable Outputs");
reg_addr = 230;
reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
reg_data = reg_data & ~0x10;
Protocol.I2C.Write(dev_addr, [ reg_addr, reg_data ]);

reg_addr   = 218;
reg_data = Protocol.I2C.Read(dev_addr, 1, [reg_addr]);
if ((reg_data & 0x10) == 0) {
    print("\n***PLL_LOL = 0, PLL is locked.***\n");
    print("***Config Si5338 Success.***");
}

print("end");

2.6 保存Si5338寄存器

//遍历Si5338寄存器,并存储到指定txt文件
clear();
print("start");

if (Protocol.I2C.Clear() != true) throw "I2C bus error. Check the pull-ups.";

const rom_len = 350;
var filepath = "D:/Si5338/tt.txt";
var data = new Array(rom_len);
var addr = 0;

FileWrite(filepath, ""); //Clear all exist content

Protocol.I2C.Write(0x70, [ 255, 0 ]);
for(addr = 0; addr < 255; addr++) {
    data[addr] = Protocol.I2C.Read(0x70, 1, [addr]);
    FileAppendLine(filepath, addr + "," + data[addr]);
    print(addr, data[addr]);
}

Protocol.I2C.Write(0x70, [ 255, 1 ]);
for(addr = 0; addr < rom_len - 255; addr++) {
    data[addr] = Protocol.I2C.Read(0x70, 1, [addr]);
    FileAppendLine(filepath, (255+addr) + "," + data[addr]);
    print(255+addr, data[addr]);
}

print("end");

 

3. 总结

通过上述步骤和注意事项,使用Digilent AD2调试Si5338芯片或其他基于I2C接口的设备将变得简单高效。AD2不仅提供了强大的捕获和分析能力,而且通过其直观的用户界面和丰富的功能,极大地降低了调试低速接口的难度,提高了开发效率。无论是学生、爱好者还是专业工程师,AD2都是进行电子设计和调试的理想工具。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/587594.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Golang | Leetcode Golang题解之第60题排列序列

题目&#xff1a; 题解&#xff1a; func getPermutation(n int, k int) string {factorial : make([]int, n)factorial[0] 1for i : 1; i < n; i {factorial[i] factorial[i - 1] * i}k--ans : ""valid : make([]int, n 1)for i : 0; i < len(valid); i {…

2024年第二十一届 五一杯 (C题)大学生数学建模挑战赛|数学建模完整代码+建模过程全解全析

当大家面临着复杂的数学建模问题时&#xff0c;你是否曾经感到茫然无措&#xff1f;作为2022年美国大学生数学建模比赛的O奖得主&#xff0c;我为大家提供了一套优秀的解题思路&#xff0c;让你轻松应对各种难题。 CS团队倾注了大量时间和心血&#xff0c;深入挖掘解决方案。通…

pyinstaller打包pytorch和transformers程序

记录使用pyinstaller打包含有pytorch和transformers库的程序时遇到的问题和解决方法。 环境和版本信息 操作系统&#xff1a;Windows 11 Python&#xff1a;3.10.12 pyinstaller&#xff1a;5.13.0 torch&#xff1a;2.2.2 transformers&#xff1a;4.40.1 打包过程和问…

【进收藏夹吃灰系列】算法学习指南

文章目录 [toc]分治算法 个人主页&#xff1a;丷从心 系列专栏&#xff1a;进收藏夹吃灰系列 分治算法 博客标题博客url【分治算法】【Python实现】Hanoi塔问题https://blog.csdn.net/from__2024_04_11/article/details/138093461?spm1001.2014.3001.5502

Mysql-黑马

Mysql-黑马 编写规范&#xff1a;## 一级1. 二级三级 1.Mysql概述 数据库概念mysql数据仓库 cmd启动和停止 net start mysql180 net stop mysql180备注&#xff1a;其中的mysql180是服务名 客户端连接 远程连接数据仓库 -h 主机号 -P端口号 mysql [-h 127.0.0.1] [-P 33…

CSDN如何在个人主页开启自定义模块|微信公众号

目前只有下面三种身份才具有这个功能。 VIP博客专家企业博客 栏目内容不知道怎么写HTML的&#xff0c;可以联系我帮你添加

15.Blender Eevee和Cycles渲染引擎对比

初步介绍 Eevee是实时渲染的引擎&#xff0c;会省略一些解算方式&#xff0c;尤其对光线和阴影 Cycles会考虑这些因素&#xff0c;所以会对光线和阴影的表达更加真实&#xff0c;有一个实时光线追踪的功能 Cycles渲染完之后&#xff0c;每移动一次画面&#xff0c;都会重新渲染…

【工程记录】Python爬虫入门记录(Requests BeautifulSoup)

目录 写在前面1. 环境配置2. 获取网页数据3. 解析网页数据4. 提取所需数据4.1 简单提取4.2 多级索引提取 5. 常见问题 写在前面 仅作个人学习与记录用。主要整理使用Requests和BeautifulSoup库的简单爬虫方法。在进行数据爬取时&#xff0c;请确保遵守相关法律法规和网站的服务…

git revert的使用

由于某种原因我们需要撤销掉之前某一次的修改&#xff0c;但是这个修改已经提交&#xff0c;并且后面又经历了好几轮的提交。可能如下这种情况&#xff1a; 那么此时使用git revert再合适不过啦。git revert ${commit_id}就可以将指定commit id的修改撤销&#xff0c;然后提交…

Java从菜鸟到高手①

目录 1.数据类型 2.定义变量 2.1.编码方式 2.2.布尔型变量boolean 2.3.隐式类型转化和强制类型转化 2.4类型提升 3.字符串类型 4.运算符 4.1.取余 4.2. &#xff0c;- 4.3逻辑运算&& || &#xff01; 4.4.位运算 4.5.条件运算符 1.数据类型 Java中&#…

Linux:使用匿名管道对进程池的模拟实现

目录 一、Makefile 二、processpool.cc 2.1创建通信管道和子进程 2.2控制子进程 2.3回收进程 三、task.hpp 四、完整代码 接下来我们将模拟实现一个进程池&#xff0c;进程池广泛应用与各个领域和方向&#xff0c;比如我们打开电脑后同时打开很多个进程&#xff08;也就是软…

SpringBoot对接前端传递的base64编码的图片信息,转成图片以Get请求进行浏览器文件下载,不下载到本地。

一、问题描述 1.1需求描述。 前端将浏览器展示的图片以base64编码的形式传递给后端&#xff0c;以此实现文件下载的功能&#xff0c;在浏览器弹出文件下载框。效果如下 1.2实现思路 将前端传递的base64进行解码&#xff0c;设置响应头返回响应体&#xff0c;代码如下。 pu…

如何安全的使用密码登录账号(在不知道密码的情况下)

首先&#xff0c;需要用到的这个工具&#xff1a; 度娘网盘 提取码&#xff1a;qwu2 蓝奏云 提取码&#xff1a;2r1z 1、打开工具&#xff0c;进入账号密码模块&#xff0c;如图 2、看到鼠标移动到密码那一栏有提示&#xff0c;按住Ctrl或者Alt点击或者双击就能复制内容&…

【大前端】ECharts 绘制立体柱状图

立体柱状图分为&#xff1a; 纯色立体柱状图渐变立体柱状图 常用实现方式 纯色立体柱状图 纯色立体柱状图&#xff0c;使用MarkPoint和颜色渐变就实现&#xff0c;如下代码 import * as echarts from "echarts";var chartDom document.getElementById("main&…

Window(Qt/Vs)软件添加版本信息

Window&#xff08;Qt/Vs&#xff09;软件添加版本信息 文章目录 Window&#xff08;Qt/Vs&#xff09;软件添加版本信息VS添加版本信息添加资源文件添加版本定义头自动更新版本添加批处理脚本设置生成事件 Qt添加版本信息添加资源文件文件信息修改自动更新版本 CMake添加版本信…

rust疑难杂症

rust疑难杂症解决 边碰到边记录&#xff0c;后续可能会逐步增加&#xff0c;备查 cargo build时碰到 Blocking waiting for file lock on package cache 原因是Cargo 无法获取对包缓存的文件锁&#xff0c; 有时vscode中项目比较多&#xff0c;如果其中某些库应用有问题&…

环形链表的经典问题

环形链表 环形链表的介绍链表中是否带环返回链表开始入环的第一个节点 本文主要介绍如何判断一个链表是否是环形链表&#xff0c;以及如何得到环形链表中的第一个节点。 环形链表的介绍 环形链表是一种链表数据结构&#xff0c;环形链表是某个节点的next指针指向前面的节点或指…

【linux学习指南】linux 环境搭建

文章目录 &#x1f4dd;前言&#x1f320; 云服务器的选择&#x1f320;阿里云&#x1f320;腾讯云&#x1f320;华为云 &#x1f320;使用 XShell 远程登陆到 Linux&#x1f309;下载 XShell &#x1f320;查看 Linux 主机 ip&#x1f309; XShell 下的复制粘贴&#x1f309; …

大数据信用花了,一般多久能正常?

在当今数字化时代&#xff0c;大数据技术被广泛应用于各个领域&#xff0c;包括金融、电商、社交等。然而&#xff0c;随着大数据技术的普及&#xff0c;个人信用问题也日益凸显&#xff0c;其中“大数据信用花”现象尤为引人关注。那么&#xff0c;大数据信用花究竟是什么?一…

【linuxC语言】exec函数族

文章目录 前言一、exec函数族二、示例代码2.1 代码12.2 代码22.3 代码3 总结 前言 在Linux环境下&#xff0c;C语言提供了一组强大的函数族&#xff0c;即exec函数族&#xff0c;用于执行其他程序。这些函数允许程序在运行时加载并执行不同的程序&#xff0c;从而实现了程序之…