Archive for March, 2008

So, after a few weeks without updates to the PIC24 tutorial, I am proud to preset the next section. This time, we explore the magical world of interrupts.

PIC24 Tutorial

-J

Comments 2 Comments »

I know some of you are waiting for updates to the Jegway documentation, and especially to the rest of the PIC24 tutorial, but things are a little busy right now, and it’s hard to find the time. I promise I’ll put them up eventually, but I’m really booked with PCB layouts at work for the next few days. Check back periodically for updates. I’ll work on them little by little, but they will trickle out eventually.

-J

Comments No Comments »

Well, a commenter on the site has a new problem to his LED blinking program. Here’s his response to my reply to his question

hi. thank you for the tip. i finally got my mcu to blink a couple of led’s im trying different patterns. doing so got myself a new road block again. im using pic24fj48ga002. i happan to connect a led on ra3 and another led on ra2. ra3 by default is the osco pin. my problem is that the two leds wont blink. but when i tried to remove the led from ra3 sudenly the other led starts to blink. i also trie to prgram ra3 to simply have a low output. and yes blinking occured but when i set it to high blinking stops again and remains lit on ra2. so what do you think may have been the problem?

I believe your problem lay with the amount of power that the MCU can provide. Each digital pin on the PIC allows for up to 20 mA of power. However, the overall power output of the device is about 100 mA. This includes the internal circuitry and the PLL (which takes up a lot power). In any case, there are several points that maybe causing you problems. One, the voltage regulator is being drained to the max and cannot power the LED. Second, if one LED can blink, but two cannot, then I assume that your problem is that you are connecting the LEDs DIRECTLY from the output pins. This would explain the inability of the PIC to power the LEDs. The solution is to use a BJT in open drain configuration to power the LEDs. Connect the base to the output pin with a resistor in series. The power drawn by the LEDs will be from the open drain rather than the output pins (since the output ratings on the digital outputs are very low). Your code looks fine. Observe below:

Open Drain

As you can see, the LED is now powered by the BJT, and will not interfere with the microcontroller. The PIC provides the base with just enough juice to turn the NPN on and off. The base current is now in the microamp range, as opposed to the milliamp range. Your LED is now powered separately poker texas holdem tipstorneo pokerasian poker tourlearn how to play pokerlive pokerlimit 7 card studonline poker cheatingadvance loan payday software? ?cashplay free online slots game,free online slots gamesultan online casinointernet video pokercasino jeux parisbaccarat en ligneblack jack onlinejeu du casinoonline casino gamescasino bonus de bienvenusjeu de roulette,regle du jeu de roulette,jeu de roulette en lignecasino en ligne avec bonusvideo poker machinescoupon bonus gratuites casinowww géant casinos frjeu sur internetjeux de casino,jeux de casino virtuel,télécharger jeux de casinosroulette de casino,roulette casino,la roulette casinola roulette anglaisela roulette casinobonus enquete casino on netbonus reward casino770casino en ligne netjeux de casino gratuitementflash games casinoplay baccarat onlinecasino salle de jeuxcoupons gratuites casinojouer a la roulettecasino gratuites sans telechargertableau black jackblackjack gamblingjeux jack black en lignejeu craps en lignejeu slotsjeu video poker,jeu video poker gratuites ,jeu video de pokerblack jack orchidtexas holdem offlineroulette au casinogeant casino en ligneforum bonus casinokeno gamecasino machine a sous from the PIC, and should blink every time. You will need to make a separate open drain circuit for each LED and connect the base to the digital outs of the PIC.

-J

Comments No Comments »

I put up several videos of the Jegway, finally. The Jegway is a Lego version of the Segway using a gyroscope and accelerometer. I haven’t finished writing the documentation as of yet, but it’ll come soon. Enjoy!

Comments No Comments »

I recently finished programming an RC Segway like vehicle called the JegWay using the lego NXT and some special sensors. I’ll have the details soon. Really excited to show this off!

-J

Comments No Comments »