I am having a very difficult time believing that you have transformed into an electronics master from graphics designer. This doesn't make sense but it's a cool angle. You are a very cool person and and I have the highest end respect for you . Keep up the great efforts.
Hey Mike, no I encourage you to keep watching this stuff and valiantly protecting Ben from anyone with an opinion, it's clearly an important part of your existence. Heaven forbid that anyone out there would benefit from correct information, especially beginners!
at 2:04: the PIC32 does have internal pullup and pulldown resistors. You need to write to the CPUE and CNPD registers. MPIDE isn't just like Arduino IDE. It is a port of the Arduino IDE to include more microcontrollers.
You can toggle a pin on Pic32 a lot faster, if I remember it was something like 8Mhz, I've programmed it in Microchip Mplab and after making sure that configuration bits are set correctly so the chip runs at 80Mhz. All chipkit boards can be programed in Mplab using pickit 3 programmer. The other useful thing about Pic32 is that you can just do TRISBSET=BIT_6; or TRISBCLR=BIT_6; TRISBINV=BIT_6; ALSO LATBSET, LATBCLR, LATBINV LATBSET=BIT_1|BIT_2; B is for port B BIT_2=1
i like your tutorials.. its very straightforward and simple to understand. thanks for your effort in making these excellent videos for new beginners like me..
I can't speak for the specific case, but if you can read from the ports using the onboard OS, then the answer to something like that is writing a keyboard emulation driver that reads the button inputs (using whatever means the device allows), and then sends a keypress to the OS. For the Pi that means learning about linux keyboard drivers. There may be easier ways though, (for instance, on windows, DirectInput can generate emulated keypresses without needing a custom driver.)
Thanks for showing the PIC32, awesome--but it is aggravating trying to see what Ben is typing but you cover it over with some cheap note only for unintelligent people. I want to see what he is showing me!
I keep seeing people asking him to show how to make these things, but I don't know what you want to see. There are plenty of tutorials on how to create CNC machines on the internet and this would follow the same principals. You would need a powerful laser instead of a cutting head (and probably some adjustments to the controller). Ben's videos on complex builds (like the one you are proposing) have to leave out most details to keep the videos short. He won't make a step by step guide.
I used a PIC32 on my TRAXMOD music player and I could swear it had internal pull ups back then and I made use of them. I was surprised to hear Ben claiming PIC32 doesn't have internal pull ups. I bet he's wrong on that one.
The PIC32 has registers to set, clear, and invert any number of bits at the same time. Assuming the compiler didn't do that already, you could save more time using those and that would save all the unneeded shifting
Clock for clock the AVR and PIC32 are actually tied for speed at bit toggling. If you write in C and don't want to pay for a compiler the AVR is a little faster even.
Also, micro-controllers and micro-processors can do a large variety of things. Every electronic device you own that has buttons or displays use them (eg. Cars, tablets, microwaves, toys, tvs, clocks, etc). Also their are many more industrial applications. To ask him to spend hours of his time making a variety of some uses is not fair, just so you can sit in your chair and say "oh isn't that neat" and then go watch another video. He's trying to get people interested in trying things on their own
For the arduino you can go two ways: Enable and use inline assembly in your scetch, or just use the microcontroller with atmel's original tools, and load the binary yourself overwriting arduino's bootloader (your arduino functionality might break and you are generally better off with a streight avr dev board if you want to do this, google the avrfreaks site for any info you might need on avr programming). Older pic mcs were programmed in assembly, so I would expect that to still be an option.
Nice video Ben, Just one bit of information that wasn't quite right in the video: Pulse width modulation works by varying the duty cycle of the LED not how fast it blinks. In other words it changes how much time in one cycle the light is on not how fast the cycles occur.
Would be great to use raw port access on the Arduino, too, and a breakdown of all results shown in a table. Btw I just tested it with my internally clocked 8mhz Atmega8a and the full cycle (rising edge high - low - rising edge high) takes 0.76us (f=1,3mhz). The Atmega328p should be even faster!
Actually a digitalWrite of a constant value to a constant pin number should compile down to a pretty ideal constant assembly instruction if the compiler is good at optimizing - the Wiring library has a special constant path for that. When I tried a similar thing with msp430-gcc, what looks like a function call indeed compiles down to a single bis.b instruction.
I agree 100% with the last comment. It was difficult and at times impossible to follow the screen with all of the ANNOYING graphic editing. If the intent is really to help people learn then leave the screen shots intact. If the intent is to be a showoff and hide your work, then I'll find other authors who are willing to show their efforts. Enough said !
Hello! I am a high school student who has been fiddling around with FPGAs and UNIX Systems. What I recently found out, is that you can run UNIX on a Gameboy. What I think would be really cool is to use the serial port in the back (usually used for multiplayer) to plug in a keyboard. I don't have the experience with FPGAs needed to implement something like this, but I would love to see it done! Any chance you can do something like this?
You should make an Mp3 Player that is also a Rubiks Cube, i've seen some that have the Rubik's Cube Style, but i want to see one that you can actually Turn and Solve while listening to music.
Hi there, I'm really stuck trying to learn microcontroller's, I've spent around £200 on books and bought the pickit's 1&3 but I don't seem to be able to get kick started with this, I've never had a problem learning a new thing before........ any ideas are very very welcome.
Hi there. The microcontroller you are trying to learn are Microchip PICs? What exactly is the most difficult problem you are facing? Maybe I can help you out. Also, are you familiar with programming languages?
Martyn Southwood Lots of great material online at Microchip: microchip.wikidot.com/training:start When I had a specific item to solve, it helps drive the creative juices. Latest one: 1992 Nissan 240SX headlights that don't go down. Bad delay module... so goal is $2 PIC, perf board, some discrete parts. So taking a 1985 design, and bringing it up to 2015. Admitted Nissan sells the module for $45, but that is no challenge.
Martyn Southwood The Arduino is exceptionally nice for learning and the learning curve is less daunting than it would be for a PIC32. I've only used AVR ATmega chips first then moved to PIC18, PIC10 and now PIC32.
pacrat90 Martyn Southwood Wait -- you can have both PIC32 and Arduino code! ChipKit. google TCHIP-USB-MX250F128B (DP32 from Digilent is board with the 28 pin dip on it...). Only catch is press "RESET" while holding BTN2, then release BTN2 to download new code.
Hi everyone, thanks for all your reply. .... I think the problem is I have no coding experience and so reading through all these expensive dedicated microcontroller books is washing over my head, I've just bought c for dummies and hoping that might shunt me in the right direction
Hello. I have a question that I will try to formulate as best as I can. I am new into electronics, and basically, I am starting to study it mainly becouse of this question I am about to make. I have 3 servo-drive motors, and I plan on using it on a 3 Axis CNC router configuration. The servo motors has the drives integrated in its housing. The question is.. Since this servo drives has a connection with a Power input and 4 Pins for CAN. Pins 1 (Can Ground) 2,(Can Low) 3, (Can High) 4, (Can Vcc). Now my question is.. How can I control this motors? What kind of controlling board gives out this signals.. Is the Can high and Can Low signals compatible with the pulse and clock signals (step and direction?) if not, how can I feed this motors with this signal in ordor to control them in a 3 axis interpolating manner. Thank you I have subscribed..
+Fernando Penas CAN stand for Controller Area Network, and it's a bit more complex than simple step-direction. CAN is a bus-type, one that you for example will find in most modern cars. You would need special hardware to talk with a CAN-bus, and then this hardware might assist you with some protocol technicalities aswell. Take a look here for example: www.microchip.com/pagehandler/en-us/technology/can/home.html
+mizcak Yes, and the packages are standardized, as far as I understood Can protocol.. They are 16 bits signal enveloped in the can protocol.. But, is it possible the signals that the drive understands are proprietary from the manufacturing company, or there is also a standard way in which the pwm signals will be encoded and decoded in the bus.. I mean, there must be an adress to each hub in the can network.... How can I find the adress to each servo drive (maybe some listening device or such)
but isn't it unfair to write the pic i/o directly vs the avr over digitalWRITE? you should measure the avr when running directly via port conmands as well
These popups on the bottom if the video often block the content of your instructions. Like in this video the code on the computer screen that you're referring to is often blocked by these annoying tie bit popups. So we can't tell what you're talking about. Please don't use those as valuable content is often blocked. The popup looks like bunch of ICs with the Ben Heck logo and some caption. Really unnecessary. Thank you.
Hi Ben, thanks for these videos! I was starting to get curious about this chip architecture, and found your channel. I am looking for how to make sounds from this chip. Is it possible? is it fast enough to synthesize or load sounds from an sd card? What DAC would be good for some >12 bit sounds? Thanks!
Excuse me Sir, Your CAPS Lock key seems to be engaged. Kindly disengage it by simply pressing the key once again. If you don't know what can be done by a micro-controller you should probably look at its datasheet for its features. Microchip makes excellent datasheets and they describe how to use the features and various supported protocols. The MPLAB IDE they make and all their libraries make programming easy too. You might want to start on an 8 or 16 bit processor first, 32 is overkill.
What type of college course would I learn what you were doing with the code for the chip? I've taken a little bit of coding classes but nothing for what you were doing.
Slightly random question, unrelated to the video but, is it safe to wire a switch to the data wire if a USB wire to easily switch between sending the data between two different devices? I don't want to duplicate the data, just switch between the source of the data.
Was the Arduino programmed using direct port? Are the processors used really comparable? The video gives the impression that PIC is way faster and I'm not sure the comparisons were done in a level playing field.
hi ben i m a swiss computer scinece student and i wantet to do some microcontroller programming for a long time but i dont know what i need to buy or build I got some medium soddering skills and a little elecronics expirience. do you have a good tuturial for this? i just find them fascinating.
Hi, after 13:58 mins, you mentioned Pic32 connected to prototype board, what is the name of the board again please? Is there a link to where we can buy it? Thanks.
Hello sir, i made a remote control home appliances using microcontroller AT89C2051 but its not working when i put first time ic then the led blink again when i put same ic second time there is no blink also when i press tv remote no working.i'm using triac insteadof relay.tell me solution
Can you tell me which microcontroller would be good for a foosball table please? I want to program audio into it so that when a game starts it plays music. I also want to add sensors so that it detects when one of the sides scores and shows the score on an lcd module or something. I want something that can support at least these options, thank you! I know C, C++ and Java, but this is my very first summer project and I want to accomplish this from scratch.
I'm sort of the one you see writing that on all of Ben's videos I mean I did write the same thing on 5 of Ben's videos I just want to see him build one maybe like a small portable one
Ben what do you think about a speaker (or two speakers) for your PC or Laptop in the shape of an old game system like the Gameboy (Color). That would be pretty awesome Martijn
KillJD Absolutely. Even if it's written Arduino on the board (and the IDE), it still is an AVR microcontroller. So you can use AVR C and even assembly if you want. You can make digital pin 8 to 13 as outputs with: DDRB |= 0b00111111; That's *way* faster than using a for loop with pinMode().
@cooltrollboy it has already been built by someone else already. Search for the Super Genintari on google or youtube. The guy the who made it also brought us the "nintoaster" and the Super "Nintoaster"
ehwnever you would normally see code, some boy is beeing placed over it making it unreadable. Please consider using the youtube annotations feature instead, so that uninterested viewers can switch it off!
Need project ideas, I am in my final quarter for school, and I have a capstone project, I need some ideas I can use a PLC, an 8051 microcontroller, and IC chips. I can't do anything crazy, I am only getting an associates in computer's and electronics, some people do conveyer, an elevator, a security system, and so on.
Hey Ben, would it be possible to use a PIC32 or Arduino module to read some of the basic data that cars output from their OBD1 / OBD2 and display them on a small LCD?
How do I do boundary scan of the PIC after it has been programmed? I Think I have to set the JTAGEN flag to high - But i don't know how. Does anyone have any advice?
first, the mid commercial made me think i was watching a suicide prevention ad. second, the consoles are at best a 4 logical and 4 physical core amd (ps4) and a 7850 gpu (going on specs given) the part im most interested in is the 8gb of ram... i found out recently that most game still assume you only have 2gb total ram, even though windows 7 is overwhelmingly 64bit with at least 4... i want to see what games can do with more ram, as i already know what they can do with a videocard alone.
The statement that using assembly is inherently fast because it has less overhead is misleading. Higher level C has more "overhead" at compile time but the generated binary/machine code is not inherently slower or even different, so timing the read write cycle delay isn't an artifact of the language. If it's compiling to less efficient or slower code using c then assembly that's a compiler issue, not a coding issue as you state here.
Sure (@detox4u) the compiled assembly from C is not really slower, but things like GCC have *always* given me more instructions than necessary. I have always got shorter/faster code by assembling only instructions I really need. I know good C optimizations should overcome that problem, but it wasn't.
most games do as follows 32bit no large access - 2gb max 32bit with large access - 3-3.5gb max (i forget how much can be seen by 32bit) 64bit os 32bit software no large access - 2gb max 64bit os 32bit software with large access - 4gb max 64bit both no large access - 2gb (i Bellevue its still 2gb... may be 4gb) 64bit both with large access - 196gb (possibly more, it may be tb) with the ps4, game developers will start making games that use 4gb ram minimum, will be interesting to see what they do.