Realtime debugging using serial decode

  Рет қаралды 31,497

mikeselectricstuff

mikeselectricstuff

Күн бұрын

Пікірлер: 60
@KeysightLabs
@KeysightLabs 7 жыл бұрын
That's a really neat way to do it, thanks for sharing! Also, I've fed the packet-decoder-edge-shape feedback to our UX engineer.
@MalinCruceru
@MalinCruceru 7 жыл бұрын
well this new,a company that actually looks into feedback from community influencers
@SatyajitRoy2048
@SatyajitRoy2048 7 жыл бұрын
It would also be nice if the text is drawn vertically when space is not adequate to print them horizontally. It will automatically rotate to vertical orientation when decoded data are compressed. This will then accommodate more information than how it could when printed horizontally. There is space to do it. Its really good that users can now easily share their experiences with officials. If I had Keysight I could have shared more, but Rigol doesn't listen to me.
@ricoreyes6044
@ricoreyes6044 7 жыл бұрын
I've toggled pins to check interrupt timing and other basic stuff like that, but it's never occurred to me to make tags with serial like that, it's brilliant! Thanks for the great idea.
@JackZimmermann
@JackZimmermann 7 жыл бұрын
Great info! I've only used to toggle a pin inside start and end of code I'm debugging. Now I feel like a tool! :) Thanks for making my debugging a hell of a lot easier! Cheers.
@tomlomax9909
@tomlomax9909 7 жыл бұрын
Just your comment about not needing to stick to traditional (slow & arbitrary) baud rates anymore is mindblowing. Going to have to experiment to see how fast I can get Raspberry Pi UARTs to go (IIRC some Pi versions have "hardware" UARTs, others all implemented in software)
@mikeselectricstuff
@mikeselectricstuff 7 жыл бұрын
Don't know about the hardware UART on the RasPi, but plug an FT232H into the USB port and you can do 12MBaud!
@tomlomax9909
@tomlomax9909 7 жыл бұрын
Awesome, thanks, I'll definitely try that out!
@pauldeboer
@pauldeboer 7 жыл бұрын
thanks Mike, that was interesting. I never thought of using the serial decode that way but I will certainly use it in future projects
@philpem
@philpem 7 жыл бұрын
Another great tip is to borrow timers/CCPs. I've had systems where the UART was in use for something else (e.g. system backplane comms) and there wasn't a second UART or SPI/I2C I could pilfer for debugging. So I defined ten timer values between 10us and 1ms (100us steps, but "zero" is clipped at 10us) and defined the values as constants. Set up the CCP in one-shot pulse mode, then load the reload register when you want to output some debug data. "I'm in state 5 of 10". On one chip we had a timer but no CCP. We borrowed a GPIO, set up an interrupt triggered from the timer to set the GPIO, then to output debug? Clear the GPIO, load the timer and set it going. Triggering is as simple as using bounded pulse trigger ("trigger on low pulse between X and Y ms") on the scope, if you want one specific condition. One idea I was looking at was a tight loop which blasted Manchester code debug packets down a GPIO to a micro which received and decoded them and blasted them down a USB port to a waiting PC. Never got round to that though. That was mostly for control loop debugging. Another engineer figured out a way to tweak the RS232 protocol to send "hidden" RS232 debug packets on that thing! Wonderful hack.
@mikeselectricstuff
@mikeselectricstuff 7 жыл бұрын
With CCP pulse widths, 9 timer values (Tbaud*1 to 9) would decide to valid (9 bit) UART values
@mikeselectricstuff
@mikeselectricstuff 7 жыл бұрын
...decode...
@babylonfive
@babylonfive 7 жыл бұрын
Hilarious that you were describing the use of a smaller decode font, and *directly below it was a smaller slimmer font* showing voltages. Lol.
@AndrewBorrill1
@AndrewBorrill1 7 жыл бұрын
Really good explanation of serial techniques, keep up the good work Mike as very few make it as clear as you do. Really liked the addition of the code snippets. Could you do an explanation of interrupt handling on a pic and whats involved?
@markusofficial9016
@markusofficial9016 7 жыл бұрын
I'm sold, I need this scope.
@jackm_
@jackm_ 7 жыл бұрын
OT: Info on that LED circle?
@txm100
@txm100 7 жыл бұрын
Yes me too, is it custom made?
@PotnoodleUK
@PotnoodleUK 7 жыл бұрын
Oh wow man. That blew my mind. Seriously though, I didn't think of doing that. Thanks Mike.
@DavideMenegalli
@DavideMenegalli 7 жыл бұрын
Mike , you really should write a book on this argument, because it is damn interesting! I am watching this video many many times trying to understand every word because you speak so fast, but if you write a book i'm sure you will get a lot of customers. (me for sure)
@mikeselectricstuff
@mikeselectricstuff 7 жыл бұрын
Book is way too much work - I'm too lazy.
@mikeselectricstuff
@mikeselectricstuff 7 жыл бұрын
You can get KZbin to play more slowly
@kewakl8891
@kewakl8891 7 жыл бұрын
0.75 playback speed helps .. as mike said earlier He can't be bothered to make it presentable for us, as he is BUSY presenting the information/content
@TegFilatov
@TegFilatov 7 жыл бұрын
Mikes' brain and speech bandwidth are too fast for us ^^
@frab88
@frab88 7 жыл бұрын
never thought about this debugging method. Thanks!
@GeorgeTsiros
@GeorgeTsiros 7 жыл бұрын
about the fancy blue outlines obscuring the values, can't the scope just dump the values to a serial line so you can watch all of it on the computer or something?
@superdau
@superdau 7 жыл бұрын
The point is to have it on screen with another signal.
@KeysightLabs
@KeysightLabs 7 жыл бұрын
On the higher end InfiniiVision scopes, you can get an exportable lister table of all the data.
@joelholdsworth
@joelholdsworth 7 жыл бұрын
sigrok can do this with a $6 logic analyzer.
@RonanCantwell
@RonanCantwell 7 жыл бұрын
.....and that's why we subscribe to your channel.
@MVVblog
@MVVblog 7 жыл бұрын
this is the channel i prefer
@NivagSwerdna
@NivagSwerdna 7 жыл бұрын
Nice. I don't have the budget for such a smart scope but many of the techniques are applicable for cheaper scopes. For us budget types it is still possible to achieve a lot of this using a toggle pin to be a condition (as you showed) and then to look backwards and interpreting the bits manually or to make a poor mans logic analyser using another microcontroller and likewise looking backwards... but it takes time.
@marekant7776
@marekant7776 7 жыл бұрын
Damn, that scope works pretty smoothly. The user interface seems super responsive. What's the retail price of one of these?
@mikeselectricstuff
@mikeselectricstuff 7 жыл бұрын
Cheap for a Keysight scope, but more expensive than similar units from Rigol etc. Checlk your local dealers for pricing. Remeber KS are giving away 5 of these a dayt this month - search Scope Month
@jackm_
@jackm_ 7 жыл бұрын
not so expensive. compare it with a dso2000A-S (or non S if you don't need the wavegen) keysight's actually cheaper here in europe: 945€ for dso2070-s (70MHz, wavegen) at batronix 812€ for dsox1102g (70MHz, wavegen) at farnell you can get a decode licence and it costs the same! then 1195 vs 1032 for 100 MHz
@polprog702
@polprog702 7 жыл бұрын
15:20 . Any advantage in using i != 16 instead of i < 16? Less assembly or just a personal preference?
@DaveCurran
@DaveCurran 7 жыл бұрын
Very useful stuff - I need to get a better scope so I can play with things like this!
@NickT6630
@NickT6630 6 жыл бұрын
I was doing some I2C bus decoding only yesterday but using the Bitscope Micro :)
@fuzzy1dk
@fuzzy1dk 7 жыл бұрын
with enough bandwidt and a bit of trickery to send the address in each prolog/epilog and combine it with the map file, you could basically get a full trace. afaict that is kinda sorta how ETM works
@fig8man
@fig8man 7 жыл бұрын
Would you be interested in looking at a seismic sensor unit thing? (I got to clean out a geographical surveying company's building that went bankrupt and got to keep a few pieces of neat tech)
@KanalFrump
@KanalFrump 7 жыл бұрын
Mike, this is golden. Great! What's the LED circle you showed in the beginning of the video?
@SatyajitRoy2048
@SatyajitRoy2048 7 жыл бұрын
Its custom made 8x8 LED matrix driven by 2 shift registers. Then they are being driven using PWM technique to get that visual effects.
@mc_cpu
@mc_cpu 7 жыл бұрын
do you ever debug on a higher spec chip (more UARTS etc. ) then actually run on a lower spec chip once debugged?
@KingMysion
@KingMysion 7 жыл бұрын
Great video! I've done similar with a project with an I2C bus in it. Already there so why not send debugging[ data to an empty address!
@90SecondsofAviation
@90SecondsofAviation 7 жыл бұрын
All Hail Mike!
@calinolteanu8079
@calinolteanu8079 7 жыл бұрын
DashCamWrecks priceless. Not sure how many got it though.
@tech4pros1
@tech4pros1 7 жыл бұрын
Mike, i somewhat remember you mentioning on a video some time ago how you store your small remnants of component tapes, but i cannot find that video for the life of me...
@stilbenenet1181
@stilbenenet1181 7 жыл бұрын
You mean this? 7:50 watch?v=pdGSFc7VjBE
@tech4pros1
@tech4pros1 7 жыл бұрын
nope
@djvanzz
@djvanzz 7 жыл бұрын
does serial decode require an extra license to activate or is it standard?
@mikeselectricstuff
@mikeselectricstuff 7 жыл бұрын
On Keysight & most others it's an option
@henryD9363
@henryD9363 6 жыл бұрын
I think this showed a very complicated example of a serial signal. I never understood what was going on. Lots of rapid detail about packets and rows and columns and interrupts and other stuff. I really would have liked to learn about the operation and functions of the scope, not the myriad complexities of the device under measurement.
@morbos
@morbos 7 жыл бұрын
For a poor man w/o a fancy decoding scope... If you uP has a DAC (or two even) that can be used to output 0..3v. Even an 8bit dac can show useful content. Just bucket up your sw state so you can visualize on the scope.
@MalinCruceru
@MalinCruceru 7 жыл бұрын
didn't understand very much but some bits were explanatory
@pvc988
@pvc988 7 жыл бұрын
Non standard baud rates are evil.
@SatyajitRoy2048
@SatyajitRoy2048 7 жыл бұрын
Yes, but sometime you need to push them at their limit.
@superdau
@superdau 7 жыл бұрын
Standard baud rates are annoying!
@FamilienSoelberg
@FamilienSoelberg 7 жыл бұрын
Fantastic video!!!
@joelholdsworth
@joelholdsworth 7 жыл бұрын
Why do you use PICs so much? There are much nicer MCUs around these days, and it seems like your projects would be better suited to an FPGA. The iCE40s are getting really popular these days due to the open-source tool-chain.
@mikeselectricstuff
@mikeselectricstuff 7 жыл бұрын
Mostly as it's what I know. Plenty of other advantages though - same tools and similar peripherals for 8,16 and 32 bit parts. Big choice of packages - often QFN,SSO,SO and DIP for a lot of parts including 32 bit. AFAIK PIC32 is only 32-bit available in DIP, and biggest RAM available in 28 pins. Microchipdirect will preprogram production parts for pennies. Good documentation & support, good availability.
Rohde & Schwarz RTB2004 protocol decoding
55:55
mikeselectricstuff
Рет қаралды 21 М.
Cheap ethernet decoding on a mixed-signal scope
29:45
mikeselectricstuff
Рет қаралды 27 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Driving LED matrix displays with an FPGA
47:50
mikeselectricstuff
Рет қаралды 81 М.
I Only Probed the Board With a Scope - Why Did My Board Crash?
12:52
Keysight DSOX1000 marketing FAIL and SPI decode issue
6:54
mikeselectricstuff
Рет қаралды 37 М.
Reverse Engineering the iPod Nano 6 LCD interface
55:04
mikeselectricstuff
Рет қаралды 195 М.
Rohde & Schwarz RTB2004 First impressions & teardown
39:44
mikeselectricstuff
Рет қаралды 54 М.
EEVblog #1085 - Bypass Capacitors Visualised!
33:35
EEVblog
Рет қаралды 287 М.
How to debug an embedded system - Part I
26:22
The Embedded Dude
Рет қаралды 2,3 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН