Re-programming a Microchip RN2903 Mote - DM164139 with Arduino IDE

I am interested in creating a pair of 915MHz radios with Microchip'sRN2903 Motes to send basic messages to each other.  Can they be re-programmed with Arduino IDE?

Posted by Do_Not_Give_Up 8 months ago


Custom PIC

Savage innovations does not offer a small OOPic chip. OOPic is my favorite MCU and I want a small one. Soooo, I decided I want to make one. In theory, The process is simple. The OOPic 2 is a PIC16F77 with custom firmware. I ordered a similar chip (PIC16F876A) to put the firmware on so I basically have a smaller OOPic. Savage innovations does not offer the OOPic firmware as a download so I have to extract it from my OOPic2. Here's my questions. Will a JDM2 programmer be able to extract the firmware? Will WinPic800 work to do this? Will this erase my OOPic's firmware entirely? Is it even possible? I would like some input and if you guys say it will be okay, I am going to do it. (I'll post and ible if it works.

Posted by gimmelotsarobots 10 years ago


Free IC Samples: Good or Bad

Every now and then I order a sample of an integrated circuit from companies such as TI, Atmel, or Microchip. But can I get too many. If I order too many do you think they will catch on to my using of their free samples for hobby use and not research? I stopped ordering because I am afraid they might start charging me for all the chips I ordered. What's your opinion?

Posted by gimmelotsarobots 10 years ago


sureelectronics PICKIT 2 & MCU Universal ZIF socket for PICkit 2 or 3?

Sureelectronics PICKIT 2 & MCU Universal ZIF socket for PICkit 2? anyone using this pickit clone ? if so; does it work well with microchips software? Almost seems to good to be true @ 50% less than straight from microchip! Thanks for your time slvrback

Posted by slvrback 7 years ago


MicroController Programming Question

So...I have a serial port....and a serial cable (monitor cable) and so....what do I need to program a microchip? What parts/connectors do i need?

Posted by Joe426 11 years ago


basic pic programing

Hi can some one give me recemendations on a book or site tht will give me insights as how to program pic microchips for robotics nothing adavance just something simple and for beginers

Posted by yerok16 11 years ago


Natural electronics

Ive been making tons of projects lately and i keep asking myself the same question. What is going on in those little components i solder on. Say i was to take resistors, capacitors, transistors microchips etc... and snap them in two, what would I see? What is it that allows people to program microchips, Is it essentially typing code and sending it into a natural resource? What allow wire to carry information? Does anyone else ask themselves these mind boggling questions? Or better yet does anyone have answer?

Posted by astrozombies138 10 years ago


Connecting 3.6v white led to 6v power supply

Trying to power up one white led, 3.6v off 6v power supply. Understand what resistor I need. What's throwing me off is this microchip looking thing inside the project I'm copying. The difference is, on the original project, there's a 4 hour timer on it. So, is this microchip used for that? Or does it have another purpose? I don't need a timer for my project, just on/off option. Picture attached. Let me just add I'm a newbie to electronics. Thanks!

Posted by Stefg023 4 years ago


Breadboards, componenets, and hot glue

Hey all... I i have a breadboard for a small circuit and it has all the regular componenets such as transistors, resistors, diodes, realys, microchips, etc.  I will have the breadboard in a plastic project case and it will be mounted vertically...  I need a way to secure the componens int eh breadboard better so i waas wondering if i can use hot glue...???  I knwo some components such as the microchip is heat sensitive when solidering but i didn't know if hot glue got to hot or if tehre would be other effects to teh circuit in some way...??? Thanks for the help...!!!

Posted by SummitSeeker 6 years ago


Arduino Coders: Idea for an instructible

I tried building this Performance Monitor project that uses a PIC device.  http://www.waitingforfriday.com/index.php/USB_Performance_Monitor The project is 4-5 years old, and Microchip has made changes to compilers and the MPLAB IDE that break the code in this project, and the maker has expressed that he is not interested in updating his old projects.  He has since switched to AVR processors for new projects because of the difficulties with the Microchip compilers and IDEs. For me, fixing his project or making a similar project for Arduino is beyond my newbie coding skills.  For someone with skills in this area, making an Arduino version of this project might make a good I'ble. 

Posted by LesB 3 years ago


Carbon dioxide sensor??

Hi, I'm working on a project that measures outdoor air quality. Wondering if anyone knows a CO2 sensor that's not too difficult to use with a microchip (bs2 or arduino)? or knows of any links to air quality projects (the ones on MAKE seem to be broken links..) thanks! Kiera

Posted by kieranof 11 years ago


GPS for pets

I am looking for a GPS system that will locate your pet cat or dog that has disappeared.  I know that there are microchips implanted in pets to identify them when they have been displaced and rescued.  There is also telemetry that is used with wildlife to track animals.  Any ideas? 

Posted by carolb4 6 years ago


Getting started with PIC's, what do I get?

Hi, I have been fiddling with Arduinos for quite a while now, I would like to get some PICs, because they are WAY cheaper, and you have to do more to get them to work, not just plug 'n play. I am going to get 2 free sample 16f648a's from MicroChip for an 8x8 matrix game like this one:https://www.instructables.com/id/Christmas-card-with-inbuilt-retro-video-game-for-u/  any suggestions for other PICs to get from MicroChip? Also, what is a good cheap programmer, or one I could build? Thanks a lot, Geek P.S. I am pretty good at soldering and electronics, so if anyone has ideas of other fun projects that would be cool.

Posted by circuitbreaker 8 years ago


Gameboy Color cart opened, chips removed. Wondering if anyone has specs for them?

I decided that I should do something with some of those old Gameboy Color games I had lying around, so I opened one. Inside, I found 4 chips, along with a 3v battery, a tilt sensor, and various capacitors and resistors. I was wondering what each of the chips do, as far as their use. And could I use them again for a different purpose? Here are the chips: *Small 8DIL with the Microchip logo, and 106 134A *Square chip with 8 pins on each side(32 in total), M8C3 -2 047U3E *Thin rectangular with 22 pins on both sides(44 in total), MX E012304-M MX23C1603-12A 1C9868A1 *28 pin rectangular, BSI BS62LV256SC-70 S2827V53114.N F0110 Taiwan(Obviously that means it was made in Taiwan) Just a quick check to see if anyone knew what any of these were. Thank you!

Posted by metrogdor22 8 years ago


Make Video Games Group: What's your favorite Microchip?

I started a new group. In the near future I hope and plan to write some video games for Microchips (PICs or other microcontrollers) such that the chip is connected to a joystick and a video monitor. I do not write PC games. I would like to know what chips are popular and cheap and easy to program for you so that any games I write would be easy for you to Make. I have a Hydra/Propeller and a PIC programmer. It is my impression that PICs are cheap and popular... compared to AVR's and such. I used to write games in the 1980's and miss that hobby. What chips do you suggest are good to write games for? What I mean is, what chips can you program; I would like you to be able to Make and play any that I or others write! Use "Rickard Gunee PIC Tetris" as a typical example of the "console", (but expect more interesting games, if any!) which will be on a breadboard, or on the Hydra Game System i got at Make Store. So tell me, What's your favorite PIC chip?

Posted by VIRON 10 years ago


My First Project (Electronic Questions)

Good morning everyone. I'm new but very optimistic on the creation and programming in PIC and I would love Buddy aid for my project. Project Idea: Store 60 responses at most 1 character (núemro or letter), to questions such as: 1 = 2 = 3 = 60 = .... At the end of the data / informed responses would be sent to the PC via USB cable or WIFI for later imported by the PC system. My questions prior to starting the project would be as follows: I'm thinking of using PIC16F877A microchip and NOKIA5110 screen. A) Any other microship less expensive cases do this activity? B) The screen initially want to use this model because it allows me to print graphs on startup and letters larger than 16x2 screens. The following outline of the design for greater understanding.

Posted by clicsis 2 years ago


make a reprogrammable ir tv remote

Im very new to programing microchips. i have been programing in visual basic 2008 for a few months now. I'v heard about this function in irshell for the psp, that actualluy lets you make new ir codes basicly you point the remote's ir emmiter to the psp's push a button on the remote and the code is writen on the psp to let the psp emmit at the same code that the remote emmits. So thats got me thinking can i build a circut that does the same job as the psp irshell. Scince im new to programming i would like to know if this is possible if so i woud like a scimatic, source code and the components needed for this project. please i need help and of cource when i get the circut working i will definatly make a instructable.

Posted by lj123456 8 years ago


Help with programming a PIC16f877A with Pickit2

I am having a really hard time programming a PIC16f877A with a Pickit2 programmer or a homemade serial programmer. I have tried several ICSP interface circuits but neither programmer can read the microcontroller.  I have been able to program other PICs with each programmer without any problems. I am beginning to think that I just have a bad chip. Does anyone have experience using Pickit2? A step by step breakdown would be extremely helpful.  Can anyone suggest a good interface for the PIC16f877A? I have tried connecting the pins directly to the programmer. I have also tried using pullup resistors on MCLR, and used a schematic for ICSP that I found on the Microchip website.  One thing I have yet to try is powering the chip with an external power supply, Would this method work? 

Posted by carjo3000 7 years ago


MIcrochip - ''can't open include file''

Hi ALL! Please help me to find the bug! Yesterday I did the new instalation of the MPLAB X  last version v3.45 after deleting the old. I did the following tutorial to find bugs in the compilation and chip injection: https://www.youtube.com/watch?v=mUofSucHx_E The problem apear when I try to inject the software in the chip with the PICKIT3 when before nevar did so new problem. Today I reinstall all the software again two times and nothing pass than the same error. Script aded here of the only both files. Thank you in advance. Me -------------------------------------- Output feedback START -------------------------------------- make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf make[1]: Entering directory 'C:/Users/Toshiba/MPLABXProjects/PIC18F2550_LED_Flashing.X' make  -f nbproject/Makefile-default.mk dist/default/production/PIC18F2550_LED_Flashing.X.production.hex make[2]: Entering directory 'C:/Users/Toshiba/MPLABXProjects/PIC18F2550_LED_Flashing.X' "C:\Program Files (x86)\Microchip\xc8\v1.38\bin\xc8.exe" --pass1  --chip=18F2550 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib   --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s"    -obuild/default/production/main.p1  main.c main.c:10: error: (141) can't open include file "main.h": No such file or directory make[2]: *** [build/default/production/main.p1] Error 1 make[1]: *** [.build-conf] Error 2 (908) exit status = 1 nbproject/Makefile-default.mk:100: recipe for target 'build/default/production/main.p1' failed make[2]: Leaving directory 'C:/Users/Toshiba/MPLABXProjects/PIC18F2550_LED_Flashing.X' nbproject/Makefile-default.mk:84: recipe for target '.build-conf' failed make[1]: Leaving directory 'C:/Users/Toshiba/MPLABXProjects/PIC18F2550_LED_Flashing.X' make: *** [.build-impl] Error 2 nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed BUILD FAILED (exit value 2, total time: 606ms) -------------------------------------- Output feedback END -------------------------------------- JAVA are in the last one version up to date My system: SATELLITE L50-A-1F2 Windows 8.1 64-bit 4th generation Intel® Core™ i7-4700MQ processor with Intel® Turbo Boost Technology 2.0 39.6cm (15.6”) , Toshiba TruBrite® HD TFT High Brightness display with 16 : 9 aspect ratio and LED backlighting Hard disk 1 TB Shining silver finish with stripe pattern, black keyboard 8,192 (4,096 + 4,096) MB, DDR3L RAM (1,600 MHz) NVIDIA® GeForce® GT 740M with CUDA™ Technology and NVIDIA® Optimus™ Technology maximum life : up to 4h00min (Mobile Mark™ 2012) weight : starting at 2.40 kg W x D x H : 377.5 x 244.0 x 25.95 mm

Posted by IvanV18 1 year ago


Noob Q about inverter for an ornithopter

I was looking in the back of my Jameco catalog the other day and they listed a product called "Muscle wire". It's apparently a nickel-titanium alloy that shrinks as it heats up. It occurred to me that I could flap ornithopter wings with it (a really small ornithopter). I was trying to figure out how I could switch voltage from one pair of wires (the flap UP wires) to the other pair of wires (the flap DOWN wires) without a microchip. I came up with something I'm sure wouldn't work involving a couple transistors, a diode and a cap. Today on wikipedia I figured out that what I was doing was something close to an inverter.So here's the question: Anyone know of a simple switching circuit that runs on a/c power and does not have square-wave switching characteristics?I'll keep researching this myself, but sometimes 'tis quicker to ask the big-brained and kind hearted (you know who you are).

Posted by royalestel 10 years ago


switching on a device using a mcu

I just want to know, I have a device (a gravis game pad pro) that continuously sends out a 3 byte serial packet via 2 wires (the game pad drives the clock, so the mcu is the slave, the clock is at 20khz), but there isn't any chip select or slave select or anything like that to start the serial transmit, and since my application circuit already has another serial device on connected to the spi pins of my PIC, I can't have the game pad on all the time, so I decided I need to control when to power on the game padwhat should be used (that i have on hand right now)?a switching regulator like the TC110 from microchip? (i don't have this one yet)a mosfet driver (i have lots of tc4424)?2n3904 or 2n2222 or bc547 transistor?EDIT: I'm just gonna use the mosfet driver... But what is the proper way to do this?or waste some program space and manually interpret the clock and the data pins? there is always five consecutive "1" in the first byte of data, and that condition can never be repeated

Posted by frank26080115 11 years ago


Electromegnetic Levatation Glove?

I've seen some devices which use electromagnets controlled by microchips (like this https://www.instructables.com/id/Electromagnetic-Floater/) to levitate small objects. I'm wondering if that same technology could be put into a sort of glove, allowing the user to levitate small metallic or magnetic objects, and maybe even pull or shoot* them? It would have a small electromagnet in each fingertip, as well as a larger one on the palm. All electromagnets could pull upwards on the object if the palm is facing down, and the object was below them. Only the fingertips would pull if it's facing up, and the object is above the palm, (but slightly below the level of the fingertips) The problem would be sensing where the object is, and adjusting the power of each magnet based on that position, and the the position of the electromagnets. *using actual magnetic repulsion would be tricky, but you could, say, have the object sit in the palm of the hand, with fingers outstretched,  then have it attracted to the electromagnets in the fingers, which turn off just as it passes by them. It retains its momentum and shoots out. So, if anyone want to confirm if this is feasible or not (or even want to make it), please post!

Posted by Vick Jr 8 years ago


Coming Soon: Dead Computer Contest - UPDATE

What can you make with a dead computer? A meat slicer? A funky endtable? A funny hat? We want to know and we'll be launching a new contest to see what you can make with old computer parts on February 1. This contest will help promote Randy's new book, so enter something awesome!  Start looking around for some old computer parts and get some ideas started. More details, including the cool prizes, to be announced later. As with all our contests, entries must be published during the contest. Previously published Instructables are not eligible. UPDATE (1/27): First Prize (3 winners) - ASUS Eee PC 1005HA netbook + copy of 62 Projects to Make with a Dead Computer + Instructables Prize Pack Second Prize (10 winners) - Copy of 62 Projects to Make with a Dead Computer + Instructables Prize Pack Dead computer = an electronic device that is a computer or has one in it. So if there's a microchip in there, go to town! Once again, contest starts on Monday, Feb. 1 UPDATE: Contest is live and can be seen here

Posted by fungus amungus 8 years ago


led flash and fade. how?

Video of RavelightPicture of RavelightIm interested in building a product that utilises coloured LED lights with multiple flashing and fading patterns.I have pulled apart a few LED products and examined the PCB's and the components and have a general idea of what is going on, however it is all new to me, and im unsure of the possibilities that exist. For example, i didn't know you could get pcb's so small...Basically i need the power source to be the small button cell batteries (up to 6 if necessary, though 3 or 4 would be preferable). With at least 4 LEDs of different colours (RGB etc). A similar design to what I want to make is a flashing LED light stick like people use at raves that I found. It has a button that seems to simply complete a circuit momentarily, and pressing it down again and again, scrolls through its 9 different flashing patterns.I have seen various different LED toys that vary on this, but are basically the same idea.The thing that I don't understand (on top of a lot of other small things) is what is under the black blob on the PCB? Is this something like a 555 timer? an IC? And how are these programmed to give all the different patterns? is it a microchip?This thing cost me $3 from a shop. three dollars!! cheap as....this is what I want for my product. can anyone help me out to understand?I can post a picture up in the next couple of days if people can't understand what i'm talking about.Thanks

Posted by noi noi 10 years ago


How To Fix The World & Grassroots Innovation Takes Root - Instructables in Forbes

Instructables, Squid Labs, Saul, and Eric are all in Forbes:Grassroots Innovation Takes Rootby Peter HoyThe next great wave of technology maybe something that you invent yourself. Really.Most of the big commercial technology companies do all they can to hide the complexity of their products under shiny tamper-proof surfaces. They believe consumers don't want to read manuals. The fewer buttons the better. Think Apple, automakers and most consumer electronics makers.But there's a subversive movement building, too, led by self-proclaimed do-it-youselfers. They want to reinvent the gadgets in their life, much like software hackers have reworked code. They don't all have expert technical skills, but they have a passionate desire to reshape technology in their own rough image.What makes their dreams possible is easy access to open-source software, cheap microchips and wide-open collaboration on the Web. It's the manufacturing-sector version of desktop publishing.How To Fix The World by Quentin HardySaul Griffith (above) is only 34 years old, but he's already helped create enough technologies and companies to last a lifetime. A short list includes a cheap way to prescribe and create corrective lenses in the developing world, a wind energy generation system using massive high-altitude kites and a human-powered energy project.His greatest creations, however, may be a popular comic book series called HowToons, designed to help kids think like inventors and, with Massachusetts Institute of Technology pal Eric Wilhelm, a Web site called Instructables, created to spur collaborative invention among adults. More news and press about Instructables here.

Posted by ewilhelm 10 years ago


Arduino ADC & Decoupling capacitors.

Hello, I have a sample Analogue to Digital Converter from Microchip.  (MCP3901). Now I want to use this ADC together with an Arduino (Uno) on a breadboard  in order to connect it to my laptop.  This works all very smoothly and all by all I am fairly happy with the result up till now. But, there is a small problem.  There is a small oscillation in the data when measuring over something with a large resistance (first 3 graphs).  The oscillation is absent (or greatly diminished) over things with small resistance. (last 2 graphs). I have only a basic knowledge about electronics and cannot get rid of (or even diminish) the oscillation. My guess is that I don't get the decoupling capacitors right. These are the symptoms: Voltage measured across the solar panel of a calculator during ~2s  (while lifting my hand). Look at the oscillation in the data . (the oscillation is about 50Hz ) And zoomed in: Secondly, in the case of a 100 kOhm potentiometer in series with a 2.2 MOhm          (There is no Omega in the special characters list?) I can see that the oscillation is scaled with the measured voltage. This means that the oscillation is probably internal.  (My guess is that the source is from the power lines which are probably not decoupled very good. And the oscillation manifests itself in the internal reference voltage) So, this goes from 0 to ≃0.2 V  (because it is a 100kOhm in series with 2.2 MOhm between 5V and ground.) increased in small steps (small turns on the potentiometer) Green = without decoupling Caps. Red = with decoupling caps (0.1µC ceramic in series with 47µf electrolytic, but it's pretty much the same with all caps.) (the oscillations here are more sinusoidal than the ones with the solar cell) And finally, there is no problem when measuring over something with a low internal resistance. Look at this graph of a (bad) potentiometer or about 100 Ohm.  And look at the near absence of noise and oscillations in the data. I can't immediately see why the ADC gives such clear data in this case. But this is definitely what I want. And a detail; Has anyone some Ideas on how to kill that oscillation? (I don't mean with fourier transforms and such)  If the decoupling capacitors are the problem, I have a limited choice in themc can you please say which ones I should search for? Thank you very much.  

Posted by Sparticles 5 years ago


Throwies reimagined - Really I did tried :) :| :/

Seeing other forms of making interactive throwies, eg using microchips impresses me.However i think it is important that we try parts of the B.E.A.M philosophyhttp://en.wikipedia.org/wiki/BEAM_roboticsNamely keeping things simple, and avoiding the use of microprocessor.The component of a interactive throwie is that it has1. Power storage2. Trigger3. Circuit4. LED5. (optional) Power collection of radiant energy.I like to see more suggestion on ways we can address each issues.But to kick start the issue, can you see if my idea is feasible.essentially for my prototype not-yet throwie, I used a circuit from http://unconventional-airsoft.com/2003/11/16/momentary-fan-switch/#more-21to create a throwie that on sensing motion, doesn't flicker but turns on for a while.By ensuring that i use few and simple componants, i hope to keep cost per throwing down.Unfortunately my problem is that using a resistor to keep the capacitor from draining too fast from the base, actually decreases the voltage drop to an unacceptable level at the led.On my end it is unsolvable for the moment. Maybe you can work out how to make a cheap throwie, that can still do these functions or more.Any ideas how to solve this?Other Ideas for throwies1.Open and attach a switch to a barometer, to have a air presser passive trigger.2. A leave shaped pad with two conductors that do not touch, to act as rain sensors. (Resistance increase when leaf dries)3. Is sensitive to infrared radiation from side, so that the throwie is trigger-able by other activated throwies. (As well infrared devices)4. Has a short loop of coil to recharged capacitors, by outside induction.5. If activated rarely, uses a tiny single solar cell to charge capacitor.6. Has a hook to be easily collected for recycling. (Using a simple loop of wire on a pole [Like a dog catcher pole] )7. A single thermistors in series with led.8. A tricolour LED, and a Two light resistor. One LDR acts to sense if it is day an night, if night a low power light is activated. Only when an object strays near, and reflect light into another LDR, does the throwie get triggered at all.9. A throwie triggered by vibration.10. A throwie that responds to radio waves.

Posted by akimbo m 10 years ago


PIC18LF4680 microcontroller and usb ttl for usart / serial data

Hi everyone. I want to know if it's possible to connect a ttl device directly to my PIC18LF4680 for serial communication via USART . I can connect the ttl device directly to my Arduino Uno without issues. The ttl  device has 6 pins (dtr , rxd , txd , vcc(3.3v or 5v) , cts, gnd) . I have two different codes snippets below that perform USART communication. * Version one(I) utilizes the "usart.h" peripheral library. * Version two(II) uses "TXREG" and "RCREG" for sending and receiving data. Both versions run well in my virtual environment (Proteus 8 Professional), but not in the real world environment. Am I missing a step? Do I need a special library? Or is it not possible with this chip? VERSION (I)   ------------------------ #include "fuses.h" #include #include #include #include void main(void) {         TRISB = 0x00;     OSCCON = 0x76;          // 8mhz (0111 0110)          LATBbits.LATB4 = 0;      LATBbits.LATB1 = 0;      LATBbits.LATB0 = 0;          unsigned char txt1[] = "Hello World \r\n";     unsigned char txt2[] = "Enter a number.... \r\n";         CloseUSART();         OpenUSART(USART_TX_INT_OFF &             USART_RX_INT_OFF &             USART_ASYNCH_MODE &             USART_EIGHT_BIT &             USART_CONT_RX &             USART_BRGH_HIGH &             USART_ADDEN_OFF ,             52);             for(int x=0;x<=20;x++){__delay_ms(50);}         // write/send intro to PC         while(BusyUSART());     putsUSART((char *)txt1);         for(int x=0;x<20;x++){__delay_ms(50);}         while(BusyUSART());     putsUSART((char *)txt2);             for(int x=0;x<20;x++){__delay_ms(50);}             while(1){         sdata = ReadUSART();                 switch(sdata){             case '1':                 LATBbits.LATB4 = 1;                  LATBbits.LATB1 = 0;                  LATBbits.LATB0 = 0;              break;                         case '2':                 LATBbits.LATB4 = 0;                 LATBbits.LATB1 = 1;                  LATBbits.LATB0 = 0;                             break;                         case '3':                 LATBbits.LATB4 = 0;                  LATBbits.LATB1 = 0;                  LATBbits.LATB0 = 1;              break;                                     default:                 LATBbits.LATB4 = 0;                 LATBbits.LATB1 = 0;                 LATBbits.LATB0 = 0;              break;         }     }     } -------------------------------------------- VERSION (II) --------------------------- #include "fuses.h" #include #include #include #define STRLEN 12 volatile unsigned char t; volatile unsigned char rcindex; volatile unsigned char rcbuf[STRLEN]; void USART_init(void){         TXSTAbits.TXEN = 1;     // enable transmitter     TXSTAbits.BRGH = 1;     // high baud rate mode     RCSTAbits.CREN = 1;     // enable continous receiving     // configure I/O pins     TRISCbits.TRISC7 = 1;     // RX pin is input     TRISCbits.TRISC6 = 1;     // TX pin is input (automatically configured)     SPBRG = 52;                PIE1bits.RCIE = 1;      // enable USART receive interrupt     RCSTAbits.SPEN = 1;     // enable USART         } void USART_putc(unsigned char c) {     while (!TXSTAbits.TRMT); // wait until transmit shift register is empty     TXREG = c;               // write character to TXREG and start transmission } void USART_puts(unsigned char *s) {     while (*s)     {         USART_putc(*s);     // send character pointed to by s         s++;                // increase pointer location to the next character     } } void main(void) {         OSCCON = 0x76;          // 8mhz (0111 0110)         USART_init();         USART_puts("Init complete! \n");     INTCONbits.PEIE = 1;    // enable peripheral interrupts     INTCONbits.GIE = 1;     // enable interrupts     while(1)     {     }     } void interrupt ISR(void) {     if (PIR1bits.RCIF)  // check if receive interrupt has fired     {         t = RCREG;      // read received character to buffer         // check if received character is not new line character         // and that maximum string length has not been reached         if ( (t != '\n') && (rcindex < STRLEN) )         {             rcbuf[rcindex] = t; // append received character to string             rcindex++;          // increment string index         }         else         {             rcindex = 0;        // reset string index             USART_puts(rcbuf);  // echo received string         }         PIR1bits.RCIF = 0;      // reset receive interrupt flag     } } ------------------------------------------------------------ Any and all help is appreciated. Thanks!

Posted by newbie14 2 years ago


MPLAB and PIC16F628A, basic EEPROM functions wont work

Hello all Ive got a query about the simulator in MPLAB.  I'm using a PIC16F628A-IP and Ive written a couple of subs to run the EEPROM functions, but when I try and run the program in the simulator and observe the registers, I'm noticing that EECON1 is not accepting bit changes, and when reading from the EEPROM, i get as far as getting the correct value into W register (MOVFW EEDATA), then the next step, simply a RETURN command, for no reason wipes the W register back to 0 and hence the routine always returns a 0 Can somebody have a look and see whats going wrong, this is one of the easiest routines to write as there are so many examples on the web, Ive even used code straight from Microchip's Code Library and that didnt work either, its driving me MAD!!! All I am trying to do with the following code is simply read the EEPROM contents of address 05, display the returned contents to PORTB, wait a second, then increment the contents by 1 and resave into the EEPROM at address 05, so by rights on power up I should see FF then 00 then 01 then 02, etc, incrementing every second, on PORTB....I'm a bit of a stickler for custom keywords so sorry if its a bit confusing, makes perfect sense to me of course! ;  GENERIC PROGRAMMING HEADER  LIST P=16F628A   ; DETERMINE CORE TYPE  INCLUDE "P16F628A.INC" ; INCLUDE DEFAULT ASSEMBLY FILE FOR THIS CORE  ORG 00H     ; START PROGRAM AT LINE 0  RADIX HEX    ; ASSUME HEX UNLESS SPECIFIED  ERRORLEVEL -302  ; NO BANK WARNINGS DURING ASSEMBLY   ;  SET BURN CONIFGURATION FOR NO WDT AND INTERNAL OSC AT 4MHZ  __CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _BODEN_OFF &_INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _LVP_OFF ;  CONSTANTS AND VARIABLES OPT  EQU 81H  ; OPTION REGISTER NN  EQU 02AH ; GENERAL N REGISTER FOR COUNTING DELAYS XX  EQU 02BH ; GENERAL X REGISTER FOR COUNTING DELAYS YY  EQU 02CH ; GENERAL Y REGISTER FOR COUNTING DELAYS TEMP EQU 02DH ; GENERAL TEMPORARY FOLDER 1 TMP  EQU 02EH ; GENERAL TEMPORARY FOLDER 2 FLAGS EQU 020H ; MISCELLANEOUS PROGRAM SPECIFIC FLAGS N  EQU 021H X  EQU 022H ; GENERAL TEMP STORES Y  EQU 023H ;  CUSTOM INSTRUCTIONS #DEFINE   BANK0     BCF       STATUS,RP0          ; Sel Bank 0 #DEFINE   BANK1     BSF       STATUS,RP0          ; Sel Bank 1 #DEFINE   READNVM CALL READ #DEFINE   WRITENVM CALL WRITE #DEFINE   W10MS  CALL DELAY #DEFINE   W1S  CALL DELAY1S ;----------------------------------------------------------------- ;  INITIALISE MICRO ;----------------------------------------------------------------- INIT   BANK1   CLRF  TRISB ; PORT B DEFINED ALL OUTPUTS   MOVLW 0FFH   MOVWF TRISA ; PORT A ALL INPUTS   BANK0 ;  SET TO MIMIC 16F84 BY TURNING OFF COMPARATOR   MOVLW 07H   MOVWF CMCON ;  PURGE GENERAL RAM FILES   CLRF NN   CLRF XX   CLRF YY   CLRF TEMP    CLRF TMP    CLRF FLAGS   CLRF N   CLRF X   CLRF Y   CLRF PORTA   CLRF PORTB   CLRF OPT   CLRF INTCON   ;------------------------------------------------------------------- ;  MAIN PROGRAM ;------------------------------------------------------------------- MAIN; ORIGIN   MOVLW 05   READNVM   MOVWF PORTB   W1S   MOVLW 05   MOVWF EEADR   MOVF PORTB,W   INCF W,1   MOVWF EEDATA   WRITENVM   GOTO  MAIN ;--------------------------------------------------------------------------- ;  END OF MAIN PROGRAM BODY ;---------------------------------------------------------------------------   GOTO FINISH  ; PROGRAM LOOP FALLOUT ;--------------------------------------------------------------------------- ;  SUBROUTINES ;--------------------------------------------------------------------------- ; LIST OF AVAILABLE SUBS: ; DELAY  = 10mS DELAY ; DELAY1S  = 1 sec DELAY ; WRITE  = WRITE TO EEPROM, MUST BE LOADED WITH EEDATA AND EEADR B4 ENTRY ; READ  = READ FROM EEPROM ADDRESS HELD IN W BEFORE ENTRY, RETURN RESULT IN W ;  10mS DELAY DELAY       MOVLW 0AH   MOVWF XX OUTER   MOVLW 0C7H   MOVWF YY INNER   NOP         NOP         DECFSZ  YY,1         GOTO    INNER                 DECFSZ  XX,1         GOTO    OUTER   NOP   NOP   NOP   NOP   NOP   NOP   NOP         RETURN DELAY1S   ; 100x10mS DELAYS   MOVLW  064H   MOVWF NN D1L  W10MS   DECFSZ NN,1   GOTO D1L    RETURN   WRITE       BANK1         CLRF EECON1                        BSF EECON1,WREN            ; enable write   W10MS   W10MS   BCF INTCON,GIE         MOVLW H'55'                ; magic sequence         MOVWF EECON2                       MOVLW H'AA'                          MOVWF EECON2                       BSF EECON1,WR   W10MS   W10MS             eeloop BTFSC EECON1,WR            ; wait for WR to go low         GOTO eeloop                ; not yet         BCF EECON1,WREN                    BCF INTCON,GIE           ; clear the interrupt flag         BANK0   W10MS   W10MS         RETURN READ BCF EECON1,WREN   MOVWF EEADR                ; set up eeprom address from W         BANK1   BSF EECON1,RD              ; set the read bit         BANK0   MOVFW EEDATA              ; return value in W         RETURN   ;  PROGRAM ENDS FINISH   END Note, this will probably make more sense if its copied and pasted into an ASM in MPLAB, as the tab stops and comments become more apparent THanks for looking  

Posted by whitebakecase 8 years ago


The Dream Factory - Squid Labs and Instructables in Wired September 2005

This was Instructables' big debut. The author, Clive Thompson, came and hung out at Squid Labs for a couple of days, and later on we had a hilarious half-day photoshoot where the photographers couldn't remember Dan's name and had to keep calling him "wrench."Wired 13.09 The Dream Factoryby Clive ThompsonThey're already living that future in a small warehouse in Emeryville, California. It's the headquarters of Squid Labs, run by a gang of five MIT alums who by day create prototypes of new technologies for outside firms - and by night fabricate weird gizmos just for fun."Everything I own is basically one of a kind," says a cheery Saul Griffith, one of the cofounders, as he crouches on the floor of his dust-covered workshop, rooting through an enormous bucket of metal brackets and bolts. A tall, shaggy Australian, he's wearing ragged flip-flops and a pair of cargo pants so stained with oil and grime that I can't determine their original color. Dozens of his group's inventions lie scattered about: a Frisbee embedded with microchip-driven LEDs, a set of robots precision-cut from plastic, a bunch of helmet-mounted laser-and-GPS sensors designed to help firefighters locate one another in a blazing house.Today, Griffith is building a "hybrid electric bicycle" with a hidden battery compartment inside the bike's 4-foot-long, chopper-style front forks. To hold the forks in place, he spent the morning designing a bracket, then cut out a flat template for it on Squid Labs' laser cutter. Now, with that template as a guide, he hacks the shape out of quarter-inch steel, using a terrifyingly loud metal cutter. "I'm really into this 'tractor' aesthetic, getting everything to look like industrial machinery!" he hollers over the cutter's shrieks, while a 3-foot cone of orange sparks flies up and ricochets off his face.Every few minutes, Griffith pauses to snap a photo of his progress. When done, he'll write up a comprehensive guide on how to build his project. This, he argues, is the next crucial step in fab culture: getting hobbyists to carefully document their plans and share them online. Squid Labs is hoping to kick-start such sharing this fall when it launches Instructables.com - an open database of interesting projects and fab techniques, "kind of like a Wikipedia for making stuff," Griffith explains. If people want to build his electric hybrid chopper bicycle, they'll be able to download the CorelDraw design of the bracket and send it someplace like eMachineShop to have their own copy printed."We got inspired when we looked at all these guys who'd engineered these incredible, modded parts for their Harleys. They'd have amazing photos of them, but they'd never post the CAD image," Griffith says. "We were like, Why not go open source?"Later that day, I get a taste of how weirdly transformative this idea is. I'm hanging out with Dan Goldwater - another Squid Labs cofounder - and admiring one of his inventions. It's a pair of plastic gears that sit on a bike pedal and power a tiny generator. As you ride, you can run LED lights or a radio. I tell him I'd love to have a version of it myself. So a couple of Squid Labs guys go over to the laser cutter, pull up the design, and a few minutes later hand me exact copies of Goldwater's gears. Design once, print often. "Pretty cool, eh?" Goldwater grins."Griffith imagines that fab tools could produce new economic models for creators. Suppose a hobbyist made a cool plastic exterior for an MP3 player. Suppose she put the design online, and 700 people downloaded the file and had it printed at eMachineShop. "At what point," he asks, "would a manufacturer say, Hey, there's a market here - and offer to buy the design from her?""So, sure, soon we'll be able to build anything. But should we? "Let's say everyone suddenly can make their own hood ornaments. What if they actually do that? The real world would look like the Internet in 1996, when people started making their own Web sites." Griffith shudders. "Remember those hideous-looking psychedelic backgrounds and stupid animations? And blinking tags?""Rainbow dividers," Goldwater adds.It's a good point - and it makes me anxious about my guitar. Sure, it looked fine onscreen. But what if it turns out to be a monstrosity in my hands? Recalling my decision to use clear acrylic for the body, I break into a nervous sweat. It's going to look like something from a mid-'80s, big-hair heavy-metal band! What the hell was I thinking?Griffith interrupts my panic to announce that his chopper is ready. He wheels it onto the street, all five Squid Labbers in tow. Eric Wilhelm, a lanky designer, offers to be the test pilot. He straps on a helmet and mounts the seat. "Does it have brakes?" he asks."Sort of," Griffith says."It's amazing how often brakes are an afterthought," Wilhelm sighs. Then he hits the electric starter and peels off.

Posted by ewilhelm 10 years ago


Your thoughts on "UFO's", strange things and the unknown

Don't take what comes below too serious please ;) I thought for the start of the new year it would be fun to talk about things we take for granted or that we would call nonsense. You know topis like those provided by Erich Däniken and other that think outside the conventional archiological range. Modern science has provided us with new insights into very old stuff but also a new look on things we thought to know better anyway. Here is some food for thought: 1. India... In this beautiful and old country it was discovered that hundreds if not over 2000 years ago people used lathe technology on stones. For example to make pillars with a weight over a few tons... Chains were created from molten rock and in many areas you find polished stone that even after hundreds of years still has a mirror finnish. Some of these creations are claimed to be made with hammer and chisel but how do you get a displayed accuracy that even modern technology struggles to provide? I don't want to clutter everything with video links but check Youtube and you will find temples in India showing musical granite pillars and chambers carved into solid rock with a precision that seems impossible! If that long ago human knd already knew about gear systems and lathe technology, then what else have we lost over time that we now claim as new technologies? How could anyone polish an entire granite hall and a big one that is to a mirror finnish? 2. Peru... Apart from being full of archeological wonders there is also the impossible to be found. The Nazca region shows, in aerial views, kilometer long and perfectly straight lines. In other regions, also in other continents, we can see images of strange people or artwork - again only from high above ground level. Some of the artwork is only in correct proportions and with proper contours if watched from a very specific angle to the mountain in question. The kilometer long lines are not simply on standard mountain faces but instead on top of mountain that have the top removed to be perfectly flat. And even with a lot of posible options to interpret the lines they look like any other huge, modern airport landing strips - including runways and tracks to areas we would call terminals or service bays. You can ignore all possible ways to interpret the design and possible use, what you can't ignore is the missing mountain top and level of accuracy on such a massive scale! 3. Pyramids... On all continents except Australia we find pyramid structures with very similar features in terms of proportions, angles and the way the face in a certain direction. In Egypt they just recently found another hidden chamber... Tunnels, too small for a human to fit point to stars and star signs. Some of the tools used to create were found with the help of small robots but also that some seem to be quite modern in age. Did grave robbers use them at a time were it is beleived that such tools were impossible to create? Or could they be as old as the pyramids itself? In south america we find pyramid structures looking quite similar to those in Egypt - why so similar in features and appearance if there was no contact between the two civilisations? To make things worse some of the Inca structures show tunnel and channel systems "leading" to the pyramid in question. Classic thought is that they were like tunnels to direct water or provide access in the beleive the jungle was not removed to hide the complex. Makes no sense if you see the city like areas that are now exposed and studied. I mean: how would created a city in the jungle without removing the trees?? What could make you wonder is a simulation that was performed several years ago. Based on a computer model in 3D different theories were tested. Irrigation was ruled out quickly, same for access routes or secret tunnels for the priests. One funny student got bored and decided to play god. Assuming the Inca priests would call their gods in the sky temple to provide rain he let a monsoon go down on the pyramid. The result was unexpected so he showed the results to his companions and they did the same test agin but simulated a massive airflow going down directly on the pyramid. Turned out the flow would be directed away under ground with more efficiency than systems Nasa uses today for rockets and space shuttles... Mind you the tunnels are far from straight and without this simulation it was trusted that they could not do this stuff... We now have rocket technology that uses surface direction and vector control. The square and flat designs leave a void insight that pretty much perferctly match the angles of those inca pyramids? Apart from pure coincidence, what could be the reason for this match in shape and angle with a tunnel system perfect to remove hot engine gasses? Ok, I admit, not all continents, the pyramids in Bosnia are just a hoax, so Europe is out of the race ;) Sorry Semir :) 4. Artwork... Be it here in Australia, the African desert or America - we find images of mystical people or rulers that could make you wonder. Again modern tech in the form color filtering, desitity readings and 3D scanning provided us details unseen before. If you think of gods in very ancient times and try to imagine you would be a native: What do think how many different images of their god could 100 people imagine? Let's agree it would be plenty... But if we study artwork in caves and rocks from around the world we find similarities that IMHO can't be explained. Many show features that, compared with modern technology, could be mistaken for helmets, gloves or even manual control systems. Others show things thought to be as simple as pine cones to resemble modern milling or finnishing tools. Again only possible by enhancing details the naked eye won't see. With no contact to each other and often thausand of years apart: What could the reason for having images of their gods show very similar and sometimes identical "features" ? 5. UFO technology and sightings... Some people love to post videos of secret weapons and UFO's that are simple rocket launches at a perfect time and with perfect weather conditions to attract attention. But what about the things we don't get to see? Just recently the US finally admitted to have a program to investigate what we might call "UFO activity", quite costly one too... This means a lot of leaked videos from fighter planes or spy planes you find on the net are actually the real deal. Often "enhanced" with editing tools but authentic ones have been released by the military and other organisations now too. If it happens over US ground and no US organisations admits to be flying the things we see than what it is? Right, it is a UFO - An Unidentified Flying Object! Does not mean it is alien, despite far too many people thinking an UFO must be alien :( UFO means just that! At the time of seeing it the ones seeing it can not identify the craft or "thing". And, no you are not alone! ;) Happens in all parts of the world and even commercial pilots upload what they can't explain. Oh, you are still a sceptic? Does that mean you think some of these sightings must be alien or do think someone down here uses technology we are not supposed to know of? If you are like me you might like to relax watching the live feed from the ISS. In case you are not try it anyway! Every noticed that that despite the stations own speed "forgeign" objects appear to come towards the station or even to grow in size very quickly? If so you also noticed another very strange thing... No matter what happens up there the stream keeps playing, even at times when the station is moved around a bit to avoid a possible hit with debris. But every single time something appears to move around the ISS or come close to it the feed cuts out. Ok, not every time, for well known stuff orbiting around like satellites, other stations, rocket lauchnes or supply flights they stay on. So, what are those flying objects changing course and direction or even circling the station? Why does the live feed cut out once an object is identified to be unidentified? 6. Roswell technology boom... Some think the US did take ownership of an alien craft, you know the stories and movies I mean... So called eye witness reports and some leaked documents all claim certain unknown technology in great detail. Anything from fibre optics and microchips, over "intelligent metals" to light enhancing glass lenses and seemingly indestructable fibres... Some say that if we would had the option to copy and understand the technology to copy it (without knowing anything about it of course) then the tech boom of the 60' would have been instantly. Imagine flat screen TV's and smartphones with GPS 50 years ago for everyone... ;) 7. Great land in the south - Antartica... The mysteries originating from Antartica range from Atlantis over hidden civilisations and living dinosaurs to the often claimed secret Nazi base with submarines and lost technologies. We all know that life as we know it can't really exists down there, so no strange animals, ancient creatures or a possibility to sustain a secret military base some 60 years ago. Or it there more to it?? Warm lakes containing fresh water with signs of life in them have already been discovered. Same for caves under the ice with temperatures far above freezing - constantly and again with signs of life. Ages ago the continent was still joint with other and in a warmer region so no wonder to find fossils. If we already found places that sustained life for thausands of years then what living things might be down there? Maybe even a place like the Galapagos Islands but for life thought be extinct - imagine Jurassic Park for real under the ice ;) With thriving life, vulcanos, rivers, lakes and all long before the dinosaurs it is not hard to imagine the remains under the ice and carved into the mountains. In todays times it all covered by ice and the sea level is much much higher, so again not hard to imagine that there might be rivers running off under the ice and into the ocean. Some maybe even connected to lakes in a hot spot sustaining life. A secret base from some secret part of the Nazi regime over 60 years ago?? Well, with all we know today about Antartica and is also known about the technological options available at that time it is possible. A submarine could have operated for days or even a few weeks under the ice with support ships available. Not just with so called secret tech but simply with a big sub on a minimum crew and the support of crude ways to reclaim and produce oxygen. If an entrance to a river leading to a suistainable area exists or existed at that time it would have been just a matter of time and endurance to find it. Of course we can't know if it was already found and removed or used since those with capable submarines and technology these days would not talk about it ;) But private or non government explorations map and drill more than ever, so once they hit "restricted areas" or create their own base and research station under the ice we will know ;) What to do if you actually see (or think you do) a real UFO?? Grab the oldest and dirtiest camera aou can find, mount it on the end of your longest fishing pole and create the shakiest video possible. And please make no references at all that would allow to get on the loctation, time or date. Jokes aside there is a good option these days, your modern smartphone, telescope, GoPro or favourite drone. A fake is often uploaded in very bad resolution often so low you might think an old webcam was used. Good fakes are often just a rocket launch, so check for this before you claim it is of unknown origins. Modern tech allows us to record a video in 4K at 60 or even 120FPS , so no excuse for a 320x240 AVI video LOL Optical zoom causes bad results so try to avoid it if possible. Image stabilisation can do wonders for free hand shots of moving objects, so crank it to the max even if the resulting video is a bit smaller in resolution. Geotagging is also a good thing as it allows an easy reference. You might see much more with you eye than what the video show, or in the best case the other way around. That means before you upload take a step back and try too see the video like someone who was not there when it happened! Are the movements reall that impossible? Is it really not just a plane, rocket flares? What sounds did you hear at the time or shortly after that might not be audible in the video? Sometimes a plane in the distance still is in the sunlight while you already stand in the dark - keep elevation in mind ;) Compare with other videos online that claim to be taken around the same time and area - sure you did not film a rocket launch? But if your video is crystal clear and shows the impossible in great detail you might want to check for the usual markings on military aircrafts or flashing lights in green and red. Still all good and impossible to explain? Then what are you waiting for? Tell us where, when and with what type of gear and upload the video so we get evidence of unknown technologies in the use/testing or an actual UFO - Unidentified flying object, until we know better. ;) Again don't take me too serious today but enjoy some of the thoughts and let your imagination wander off a bit. Lost technologies and knowlege exists, existed, is found again - whatever you want to call it. If humans could move stone blocks the size of a small house and create them with an accuracy down to the mm then they might have known more than we think they did. If we could melt granite to form new things, manipulate its sound or carve hollow heads of just a few mm in size then again we lost something well worth knowing. If in ancient times people had no way of seeing really distant and dim stars then how were they able to accurately map them and predict their movement? If milling and lathe technology was known and used when in other parts of the world we were happy to create simple and weak tools: How was it possible to create gears and know about planetary gear systems? If the evidence of the work clearly shows advance technologies used then where are the tools used and why can we find any written records or images of it being used? If even the all mighty US military, secret agencies and space programs fail to explain what they encounter quite often since we fly around: What is really that seems to try to hide from us while appearing to watch how we evolve, explore and fight wars? Since you still bother to read all this nonsense: If it appears we have "evidence" of the existance of beings capable of flying or even space travel since the dawn of time and add all the modern evidence: Is it possible someone or something has been watching us since humans came to be? Did "they" guide some cultures at some stage during their evolution to show us modern ways of creating alloys, machine stuff or understand what was magic or the gods at that time? And if they did help our evolution in some parts then why did this greatly improved society disappear with no more trace than their stone remains? How would we react if they dare to help us again? Is there a reason that even after countless encounters noone tried to shoot one of the UFO's down? I mean, not even a claim for trying since Rosswell..... Not any evidence of a recent landing either..... Or are we just watched so closely because they want something back we too from them??? ;) I blame all spelling mistakes on my annoyingly unresponsive keyboard. But if you still find some then feel free to keep them! I still demand a fee if use them to make money from them ;)

Posted by Downunder35m 7 months ago