Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : ChatGPT when you need code explaining
Author | Message | ||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 857 |
Found some µpython code that wasn't commented and so I handed the line over to ChatGPT: How cool is that |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 857 |
I asked: "So this could give me a DAC with 16bit resolution?" Pretty darned impressed. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6780 |
Always bear in mind though that AI will tend to give you the reply that it thinks you want or that it considers would be the most suitable. Neither of these cases means that it has to be accurate, that's a lucky side effect if it happens to be so. :) It actually has no concept of accuracy - or of anything else, in fact. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1241 |
¡Así es exactamente! Regards Michael causality ≠ correlation ≠ coincidence |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4223 |
Phenix, ChatGTP may explain you a 16 bit ADC pn a pico. I am willing to bet that there is no-one here on this forum that can design the hardware to give you a real 16 bit resolution and accurate DAC on a pico. Offsets that can be 25uV max over temperature. Linearity 0.0016%. External reference voltage, pwm filter, buffers in and out. Much easier to buy a 16bit DAC from TI or AnalogDevices, and write tje SPI cpde. Volhout Edited 2024-08-21 00:05 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2075 |
do remember, also, that it makes stuff up (It gave me a mnemonic of CP B,76 in some Z80 code once ) and check out this straight contradiction trying to back up a miscalculation have to say I don't use it much because unless you are already frequented well with a subject, you can't trust it to give good info. I use it to generate the text of ADO user stories etc. where it just has to spool out tons of guff. h |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 857 |
@Volhout Being a perfect DAC is not the issue. When running a servo-loop @1KHz, the DAC output is never steady. However, I have a range of 20V (+-10v) and with our existing PWM, we have a range of 0 to 100% with a resolution of 0.1% = 1000. So I have a resolution of 20V / 1000 = 20mV. I only mentioned 16-bit because the example was 65535 but if I could get 12-bits, my resolution would be 20V / 4096 ~= 5mV. Right now, I have actual 12-bit DACs and intend to stick with them (PWM updates cost me an entire millisecond) but I stumbled across that code and wanted to be sure I understood it. |
||||
DaveJacko Regular Member Joined: 25/07/2019 Location: United KingdomPosts: 76 |
Phenix mate, interesting post, btw. would it be a good idea to have a general conversation about AI on this forum? as this is, surely, where the really smart, trusted guys hang out... I don't think AI could generate MMBASIC just yet. that's my Turing Test ! |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Yeah tried, it was pretty useless. The LLM probably hasn't been introduced to much MMBASIC code, but as it gets updated and trained, this may improve. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2120 |
it's new to me and interesting |
||||
Rickard5 Guru Joined: 31/03/2022 Location: United StatesPosts: 463 |
@ PhenixRising A Friend of mine's sone is one of those kids that always has the hottest Gaming PC. so last Christmas I took his old Ryxen 7 gaming box when he got his new machine and Built me a OLLAMA Web UI Box so I could Private full featured Un censored Chat GPT anywhere on my Network and the best Part Sir Mark Rowley, Commissioner of the Metropolitan Police Service won't come and get me :) :) No seriously there are TONS of Great Models out there for free Right no I'm using a Python that I can give 2 or 3 sample code snippets and tell it to make one program and done I may be Vulgar, but , while I'm poor, I'm Industrious, Honest, and trustworthy! I Know my Place |
||||
Print this page |