thank youIt is best to post other engineers' code on Chat GPT section by section and tell the AI that it is developed for the PIC32 in order to comprehend it. The finest AI currently in use for debugging and understanding programs is Chat GPT.
Any why do you think that ChatGPT, which has NO comprehension of ANYTHING, is going to provide an accurate analysis of someone's code?It is best to post other engineers' code on Chat GPT section by section and tell the AI that it is developed for the PIC32 in order to comprehend it. The finest AI currently in use for debugging and understanding programs is Chat GPT.
Like anything worth doing you cannot become proficient at it overnight. Similarly, you have to keep doing it to gain that proficiency. Your patience and tenacity will be rewarded eventually.Hi all,
I always find it so hard to understand other people's firmware any better way to understand other people's firmware written in pic32 microcontroller anyone could share a better way?
Don't be so sure.... here's a little experimentAny why do you think that ChatGPT, which has NO comprehension of ANYTHING, is going to provide an accurate analysis of someone's code?
#define LED 2
void ledOn(){
digitalWrite(LED, HIGH);
}
void ledOff(){
digitalWrite(LED, LOW);
}
void setup(){
pinMode(LED, OUTPUT);
}
void loop(){
ledOn();
delay(500);
ledOff();
delay(500);
}
#define LED 2
void changeLED(){
digitalWrite(LED, !digtalRead(LED));
}
void setup(){
pinMode(LED, OUTPUT);
}
void loop(){
changeLED()
delay(500);
}
#include <SPI.h>
#include <mcp2515.h>
struct can_frame canMsg1;
struct can_frame canMsg2;
MCP2515 mcp2515(10);
#define sw 8
void setup() {
pinMode(sw, INPUT_PULLUP);
canMsg1.can_id = 0x0c180001 |CAN_EFF_FLAG;
canMsg1.can_dlc = 3;
canMsg1.data[0] = 0x23;
canMsg1.data[1] = 0x01;
canMsg1.data[2] = 0x01;
canMsg1.data[3] = 0xAA;
canMsg1.data[4] = 0xAA;
canMsg1.data[5] = 0xAA;
canMsg1.data[6] = 0xAA;
canMsg1.data[7] = 0xAA;
// canMsg2.can_id = 0x055;
// canMsg2.can_dlc = 8;
// canMsg2.data[0] = 0x00;
// canMsg2.data[1] = 0x55;
// canMsg2.data[2] = 0x55;
// canMsg2.data[3] = 0x55;
// canMsg2.data[4] = 0x55;
// canMsg2.data[5] = 0x55;
// canMsg2.data[6] = 0x55;
// canMsg2.data[7] = 0x55;
//
while (!Serial);
Serial.begin(115200);
SPI.begin();
mcp2515.reset();
mcp2515.setBitrate(CAN_125KBPS, MCP_8MHZ);
mcp2515.setNormalMode();
Serial.println("Example: Write to CAN");
}
bool bPressed = false;
uint8_t nCount=0;
struct can_frame *frameAddr;
char buf[64];
void loop() {
//send once each button press
if(digitalRead(sw) == LOW && !bPressed)
{
bPressed=true;
mcp2515.sendMessage(&canMsg1);
delay(100);
}
if(digitalRead(sw) == HIGH){ //debounce release
bPressed = false;
delay(50);
}
}
I am not a SPICE user. This is the answer it gave me and I find it sensible and convincing but I have no idea if it is correct.Try asking it what a SPICE .subckt does. The answer will no doubt surprise you.
ChatGPT does well on code simply because there is no need for actual intelligence to splice bit and pieces of computer language grammars in to something that looks proper from a statistical match at a glance but may have huge numbers of bugs as a useful implementation. ChatGPT has no comprehension of what you entered and what it outputted because it's Large Language Model, not a programming code expert system or AI. Humans are responsible for every character of that code from the original sources, that to the computer, is just another language grammar output with a high statistical match.Don't be so sure.... here's a little experiment
...
Now, I'm not saying it would handle anything more complex as well, after all, the Blink sketch is well known and documented. But I think it belies your statement @WBahn and on more complex code may give insight even if its not 100%
Hi there,I am not a SPICE user. This is the answer it gave me and I find it sensible and convincing but I have no idea if it is correct.
I just read this morning that the job of programmer may soon be left in the past due to AI taking that over. I read that AI will be able to program and so anybody can become a programmer.Any why do you think that ChatGPT, which has NO comprehension of ANYTHING, is going to provide an accurate analysis of someone's code?
The current 'AI' systems write CODE from previous human generated examples, they don't program. Code is the rote part of programming like holding a pencil and translating the actual intelligence of another person with the understanding a problem, the mental pictures of how things work, plans and interactions of thoughts into the proper syntax and grammar to be compiled or interpreted on a computer system.Hi there,
It looks pretty good to me and i've been using spice for at least 20 years or more now and have created many subcircuits.
It's funny this came up because i was just reading about some professor who was saying one of the jobs that will go in the future is programming. He said AI will be able to write programs so that anybody can become a programmer. I find it hard to believe, but with the above and other responses i have seen now maybe it's not too far off.
To take advantage of all this, maybe we need a new forum section dedicated to asking AI questions.
If you were to scour the internet for strings of text similar to the question posed, you would find a high likelihood of seeing strings of text similar to the answer it generates. It is merely playing the odds. It is not intuiting anything.I'm not entirely convinced by the arguement "its a large language model" or maybe I'm easily impressed. In my CANBUs example earlier I was surprised by its ability to seemingly intuit macro functionality from the code eg the debouncing of the push button.
I'm trying to think of some code from lab projects that are relatively unique...
I actually wouldn't be surprised if the answer to this question was pretty decent.I wonder, could ChatGPT explain ChatGPT?
Yes, but would it answer with the ChatGPT code?I actually wouldn't be surprised if the answer to this question was pretty decent.
Anything that can be found on lots of sites with a simple search is likely to be something that ChatGPT is going to regurgitate fairly well.
I'm not entirely convinced by the arguement "its a large language model" or maybe I'm easily impressed. In my CANBUs example earlier I was surprised by its ability to seemingly intuit macro functionality from the code eg the debouncing of the push button.
I'm trying to think of some code from lab projects that are relatively unique...
That's the problem. it obviously doesn't know and you, unless you already have at some familiarity with the information in detail, don't know. If you get a decent answer it's because the problem has been solved thousands of times in the internet universe, not because it's a good solution to a rare or unusual problem. Often, when you query the reason for the answer, Explainability, often goes right out the window. IMO, black box answers make for bad products.The models don't really "know what they know". They don't even know what "knowing" is. All they do is guess the next token in a stream, and this next token guess may be based on either well-founded acquired knowledge, or it may be a complete guess.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
E | Crosstalk analysis | PCB Layout , EDA & Simulations | 0 | |
M | Analysis of a circuit | Homework Help | 51 | |
R | DC Analysis Of This Circuit | Analog & Mixed-Signal Design | 56 | |
![]() |
Two NMOS in series (steady state) | Homework Help | 1 | |
A | Way to analysis Firmware | Microcontrollers | 9 |