Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
set your output high, delay for 1 second or 1000 ms, set output low, this is the easiest way to do this.say i do this on my PIC in CCS C:while(1){ output_high(PIN_D0) //I'm simply selecting the pin to use here and setting it high delay_ms(1000) //1000 ms delay, or 1 second output_low(PIN_D0)}This is a very basic set up of a loopalso take a look at the servo page on the SoR site it helps out abit too.
If this is for capturing your IR remote pulses, I don't understand why you don't want to build that IR widget, it is really easy. There is also the IR Decoder schematic on that knowledge base I showed you!
Do you need to program an IC to make the IR widget work?I want to make the USB version then.
Quote from: dannytemmerman on February 11, 2009, 06:55:19 AMDo you need to program an IC to make the IR widget work?I want to make the USB version then.Yes they use a PIC, but if you're good you can do it with any IC. You will also need something like a ft232rl or cp2103 breakout from sparkfun.com for the USB connection to the IC. Then you can just do it all on a breadboard with the minimal configuration using that Fairchild QSE157 IR detector.Once you get the data into your computer you use that free IR scope software to read the data. From there you can visually see what the pulse looks like.
From the link:The IR Widget solves these problems by using a microcontroller to process the IR signal without interruption and send the data to the PC using ordinary asynchronous serial transmission. This allows the OS to service the serial port with standard drivers and allows the use of USB to serial converters. Simple circuits built with 74HC series parts can also be used. The data is sent in real time and is in a format that allows reasonably precise reconstruction of the actual IR signal received.The code for the IC is linked at the bottom of the page, He also mentions using simple logic ICs '74HC' series in another version of the schematic.http://www.compendiumarcana.com/irwidget/
Follow this schematic:http://www.compendiumarcana.com/irwidget/usb_simple.pngL1 is usually a ferrite bead, but trust me and buy a breakout board and you won't need to do all that.Parts listhttp://www.sparkfun.com/commerce/product_info.php?products_id=718http://www.sparkfun.com/commerce/product_info.php?products_id=8375 (get a handful, you use these like candy in electronics)http://www.sparkfun.com/commerce/product_info.php?products_id=533http://www.sparkfun.com/commerce/product_info.php?products_id=8377http://octopart.com/info/Fairchild/QSE157http://www.sparkfun.com/commerce/product_info.php?products_id=112http://www.sparkfun.com/commerce/product_info.php?products_id=8023 (hookup wire for breadboarding)and i've never used PICs because I heard their development environment isn't fee whereas all the tools to program an AVR are free.I would try to do it with this (but the code would need to be modified a bit):http://www.sparkfun.com/commerce/product_info.php?products_id=211otherwise here is your PIC:http://octopart.com/case+%2F+package--DIP-8/search?q=pic12f629EDIT: MCU's need to be programmed using either a special programmer or via a serial port. You can check their respective datasheets.PS. If you want to wait a bit, I plan on making one of these within the next couple weeks, and I could write up a tutorial.
I looked more at that IR widget, and I got all the parts to make the simplified USB version, but I looked at the code and its written in ASM for the PIC. I was hoping it was going to be in C so I could easily translate it into C for the ATmega.