hybridfree/eevblog-posts huggingface dataset:
uC USB throughput - Page 1
Forum section: electronics / general

author: Harvs
author_rank: Super Contributor
timestamp: February 05, 2013, 01:22:44 am
content: Just wondering if those with some practical experience could give me some pointers on what the likely expected throughput of HID (i.e. Interrupt) and Bulk transfers are on a modern 32bit uC are in a practical situation (that is, still leaving enough CPU time to service other tasks.)I've been learning HID USB on the PIC32 and Windoze C# of late. At the moment I'm maxing out at about 2kB/s up and down (obviously need to send a report to get one back). Turn around time is about 30ms from initiating a transfer on the PC to getting a report back. I haven't had the chance to properly benchmark the different sections of code on both the computer and uC but I suspect there's some significant latency on how I'm initiating the transfers under windoze.I've just been using HID at the moment, due to it's relative simplicity in windows using the default Windows drivers.I just don't want to spend too much time investigating Windows and the microchip usb library timing if this is about what's to be expected. I probably just need to move over to Bulk transfers.

author: nctnico
author_rank: Super Contributor
timestamp: February 05, 2013, 01:32:04 am
content: The fastest I got was about 600kbps on a serial port emulation using Y-modem (or X-modem). The problem wasn't the uC but the serial port program and the fact the 'protocol' sends chunks of 128 bytes.

author: andersm
author_rank: Super Contributor
timestamp: February 05, 2013, 03:53:37 am
content: To get high transfer rates you have to construct your application so there is always an outstanding transfer request. In practice you will have to split the USB handling into a separate thread, and be careful to prevent it from being blocked by the main processing thread. I don't know how much overhead the C# environment will incur, but 2KB/s is definitely at the low end.

author: Harvs
author_rank: Super Contributor
timestamp: February 05, 2013, 04:09:28 am
content: Thanks. At the moment I've just got a timer event firing on the main UI thread, which initiates a transfer and spawns a new async thread with a callback to the UI once the IN report is received. I imagine that process of initiating a new thread for each report read, and all the marshaling that needs to go on between managed and unmanaged code is killing the throughput. Also I believe from the "USB Complete" book that the bus latency for an interrupt transfer to actually get a time slice on the bus can be between 1-10ms.I might setup a simple pin toggling on the uC to indicate the time between a report being received and response sent to see what portion of the turn around time is the uC.
STM32 USB lib - Page 1
Forum section: electronics / general

author: Harvs
author_rank: Super Contributor
timestamp: February 04, 2013, 10:45:14 am
content: Hey all,Just wondering if the STM32 USB libraries are ok before I commit the time to learning them? There seems to be lots of bug reports on other forums about OTG, but I don't intend on using that at the moment anyway. Any gotcha's I should be aware of?I note there's a few other libraries out there that people seem to be using around the various forums on the web, I'm guessing most are paid for versions though.Will be on the F407 DISCO board at the moment, with Sourcery GCC.
controlling LCD display with PMPort of pic32 - Page 1
Forum section: electronics / general

author: djlorenz
author_rank: Contributor
timestamp: January 29, 2013, 10:52:17 pm
content: still learning something on the "exploring pic 32" book of lucio di jasio,they build a good library for LCD display with Parallel Master Port and they use it with Explorer 16 board...they configure the port with this:Quotein the Explorer 16 board the Enable bit is connected (correctly) to PMWR bit and they use PMRD for R/W and PMWR for Enable,in my chinese Sure Electronics pic 32 demo board they connected R/W to PMRD but enable bit is connected to PMCS1,i thik is this the problem that the software doesn't work with my board...do you know if there are some possibilities to configure the PMport working with PMCS1 acting Enable bit?thank youLorenzo
PIC18F25k50 USB without crystal - Page 1
Forum section: electronics / general

author: ptricks
author_rank: Frequent Contributor
timestamp: January 21, 2013, 01:19:24 pm
content: Just got some of the PIC18F25k50 chips and am impressed with everything that is included, pdf sheet is here:http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en558862One feature I have wanted on pic parts for a long time, usb without having to use an external crystal. It isn't that big of an issue, more an annoyance, but when you want to throw something together quick it can be difficult to keep stock of the right crystals for everything so I have been moving away from crystal requiring parts when possible.I find it amazing how much can be crammed in such a low cost device.

author: PA0PBZ
author_rank: Super Contributor
timestamp: January 21, 2013, 01:29:57 pm
content: And then you changed the model while I was replying that it did not have USB

author: jerry507
author_rank: Regular Contributor
timestamp: January 21, 2013, 06:46:52 pm
content: What's more amazing is that they cost so little yet every device has factory trimming done to the oscillator to keep it within spec for USB. They're certainly not the first to do this, but it is nice to see them adopting it.

author: PA0PBZ
author_rank: Super Contributor
timestamp: January 21, 2013, 06:55:54 pm
content: It looks like they synchronise the clock to the USB host:Active Clock Tuning:This option allows the internal oscillator to automatically tune itself tomatch USB host or external 32.768 kHz secondary oscillator clock sources. Full-speedUSB operation can now meet specification requirements without an external crystal, enablinglower-cost designs.Very interesting, I also always hated the need for an external crystal when using USB.
XC8+Pickit2 = slow - Page 1
Forum section: electronics / general

author: poorchava
author_rank: Super Contributor
timestamp: January 15, 2013, 04:31:56 pm
content: I have recently switched from MPLAB 8.something and C18, to MPLABX 1.6 and XC8 compiler. I am using genuine Pickit 2 and the target is PIC18F4553.I have noticed that it takes MUCH longer to enter debug mode (i mean compile, link, program mcu, enter debug mode) than old MPLAB did. Have you also noticed that? Maybe there's something wrong with my hardware (it's rather old, but quite capable)? I especially see difference in compilation time.I like XC8 much better than C18 (normal interrupt declarations! at last!), but this is somewhat annoying to wait for like 10-12 seconds for debug to start, while in old MPLAB it used to takes like 6 seconds or so.

author: AlfBaz
author_rank: Super Contributor
timestamp: January 15, 2013, 04:44:26 pm
content: I believe its because mplabx creates a huge make file first and then sends that to the compiler tool chain.I remember the mplab x guys saying they were going to address this about 18 months ago, looks like they never got around to it

author: JoannaK
author_rank: Frequent Contributor
timestamp: January 16, 2013, 12:59:18 am
content: XC8 sucks anyhow.. apparently only way to make it produce half decent code is to purchase 500USD 'standard' package. And with 1500USD it might even do decent code.Edit: couple linkshttp://www.microchip.com/forums/m698536.aspxhttp://www.microchip.com/forums/m668751-print.aspx

author: Niklas
author_rank: Frequent Contributor
timestamp: January 16, 2013, 06:57:10 pm
content: If you have the full version of Microchip's C18 you might get an XC8 license for free.I have also noticed that everything seems to be a bit slower than before but I use RealICE instead of Pickit2. Still have MPLAB 8.43 and C18 3.xx for some older projects. One thing that I like with XC8 is that I no longer need separate LCD and RS232 functions for RAM and ROM strings.

author: poorchava
author_rank: Super Contributor
timestamp: January 17, 2013, 10:55:17 am
content: Yeah, some features are definitely nice:-easy interrupt declaration-ONE include file for all controllers (which on the other hand is the reason for slowness according to Microchip forum)-no more 'const rom' stuff-no more ram and rom string functions
Pickit 2 questions - Page 1
Forum section: electronics / general

author: Bibiricat
author_rank: Contributor
timestamp: January 03, 2013, 10:01:22 pm
content: Hello.I am trying to build a pickit 2 clone, and there it says that i have to burn a hex in the pic18f2550. I have the hex file (PK2V023200.hex), but it says it's 91KB , and the pic mc has only 32k memory. The schematic i have does include 2 eeproms , but it says that they are not needed for programming and/or debugging.Is there something i'm missing, or the hex can be burned into the mc ?

author: Bibiricat
author_rank: Contributor
timestamp: January 03, 2013, 10:03:06 pm
content: This is my guide:http://www.circuitvalley.com/2011/07/pickit-2-clone-universal-microchip-pic.html

author: kripton2035
author_rank: Super Contributor
timestamp: January 03, 2013, 10:15:22 pm
content: an .hex file is inside a text fileit represents the bytes with their hexadecimal valuethe byte "AA" is stored as a text string "AA"there are also carriage return each 8 or 16 bytesand if I remember some control sumso in fact the real hex file is less size than the .hex file you haveopen it with an pic programmer and you will see what I mean.editopen it with a program such as usppicprog here :http://usbpicprog.org/?page_id=16your hex file is exactly 32Kb in reality.
Info on Intel P87C521 - Page 1
Forum section: electronics / general

author: Stonent
author_rank: Super Contributor
timestamp: December 31, 2012, 05:20:16 pm
content: I've recently come across a few 40 pin DIPs with the following on them:P87c521L1027a327Intel ©1980From what I can tell they are an 8 bit Microcontroller, but my quest for a data sheet has come up short.Every site I've found that claims to have a data sheet wants money for me to see it. I would have thought Intel would have something but searching their site for p87c521 doesn't pull up anything.Is anyone here familiar with this chip, what its specs are (ram/rom/fuses/sram/clock speed) or does anyone know where I can find a real data sheet or am I just stuck having to pay some third party which to me doesn't seem legit since they're distributing a document written by Intel?

author: nctnico
author_rank: Super Contributor
timestamp: December 31, 2012, 05:42:55 pm
content: Its an 8051 based microcontroller:http://www.ryston.cz/pdf5/87541.pdfI recognize the urge to find some use for it but in the end your time is better spend on something more up-to-date.

author: Stonent
author_rank: Super Contributor
timestamp: December 31, 2012, 06:03:14 pm
content: 256 Bytes of RAM? OUTSTANDING! I think I'll get started on porting Linux to it right now!

author: SeanB
author_rank: Super Contributor
timestamp: December 31, 2012, 06:09:15 pm
content: You can fly to the moon on 256 bytes of ram............Or at least do a good small controller with it.

author: free_electron
author_rank: Super Contributor
timestamp: January 01, 2013, 01:00:44 am
content: Quote from: Stonent on December 31, 2012, 06:03:14 pmany os needing more than a few bytes of ram for its i ternal housekeeping is bloatware!The 8052 is very easy to make a multitasked , pre-emptive microkernel with a hundred bytes of code and 10 bytes of ram. The cpu has 4 registerbanks. You assign the kernel to 1 bank , and up to three processes each their own bank. You use a hardware timerto trigger a high priority interrupt that kicks in the kernel. The kernel saves two or three registers in the process page and does a contaxt swap.Very easy to do. Since each program lives in its own bank there is no risk of ome process killing another.
Program example to read RCREG - Page 1
Forum section: electronics / general

author: Dave_PT
author_rank: Frequent Contributor
timestamp: December 07, 2012, 11:06:30 pm
content: Hello all.I am doing some tests with the compiler XC8.I wore before CCS, but it did not satisfy me ...I just started to learn to work with the compiler XC8, but right now I can not get a code to read the USART.The code is all set, but I do not see how I will get to RCREG values??.Some example please?I also can not use "scanf" and can not find much information on the microchip that ...Thank you.

author: David_AVD
author_rank: Super Contributor
timestamp: December 08, 2012, 08:00:26 am
content: Wouldn't you just assign RCREG to another variable?Something like " SomeVariable = RCREG " ?

author: Dave_PT
author_rank: Frequent Contributor
timestamp: December 08, 2012, 09:36:23 am
content: HelloAt the same time I'm simulating in proteus and when I do I can not get anything.What I do is enable the reception of data and wait for a change in RCIF flag.If you do, the flag RCIF never changes ...Have experienced using scanf such as scanf ("% d", & v) ... but get an error saying I do not have 256 bytes available ...Thank you.

author: Dave_PT
author_rank: Frequent Contributor
timestamp: December 09, 2012, 11:35:01 pm
content: Can anyone help me please?I bet it is a very stupid mistake on my part ... but I can not find!http://www.microchip.com/forums/m692901.aspx

author: AlfBaz
author_rank: Super Contributor
timestamp: December 10, 2012, 06:12:22 am
content: DarioG has posted twice with your probable answer. If you don't clear the usart error flags in the appropriate register nothing more happens.Also you need to make sure rcreg has been read prior to going into your loop. All this info is in the data sheetThe other thing going on is you are simulating this in proteus, who knows whats going on there.In that microchip post, you have some of the best and most helpful people on that forum helping you. If you don't give them feedback on their suggestions, simply restating your original problem isn't going to get you any further help.
Arduino - PC isolation communication - Page 1
Forum section: electronics / general

author: singera
author_rank: Contributor
timestamp: November 29, 2012, 10:26:27 pm
content: heyI need to build isolator between the arduino and th CP2102 (USB to TTL) transiver, I bought on ebay 10*pc817and I want to build this:http://softsolder.files.wordpress.com/2009/12/schematic.pngwhat Is the VCC voltage on the arduino and the CP2102 that I need to connect to this (5V or 3.3V tha I have both in the arduino and the cp2102)?the arduino will operate with battery or plug pack and the cp2102 will operate with usb power.

author: Harvs
author_rank: Super Contributor
timestamp: November 30, 2012, 11:15:01 am
content: On the Arduino side it's pretty easy, just use the 5V from the Arduino itself.On the cp2102 side, assuming you're powering it off USB power, then the cp2102 has an internal voltage regulator capable of 100mA. Given the cp2102 needs about 26mA of power, that leaves you with around 70mA at 3V.Or alternatively it looks like the IO pins are 5V tolerant, so you could power it off the USB supply directly. But double check that on the datasheet before you go ahead, I've only had a quick look.https://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf
volt/ammeter chip - Page 1
Forum section: electronics / general

author: robertj352003
author_rank: Newbie
timestamp: December 17, 2012, 05:38:53 pm
content: Does anyone have a suggestion for a volt/ammeter chip or microcontroller to measure up to 50v 1a?

author: Smokey
author_rank: Super Contributor
timestamp: December 17, 2012, 07:14:35 pm
content: What kind of resolution?What kind of speed?What kind of isolation?What kind of interface?Simple solution assuming you already have a micro with ADC and don't need isolation (pretty much any uC will work):Resistor divide the 50V down to whatever the uC ADC can read. Watch out for wattage on the resistors.Sense the 1A across a resistor and feed that back to a uC ADC. Again watch out for wattage.If you need isolation on the voltage sense, look into isolation-amplifiers for the voltage like:http://www.avagotech.com/pages/www.avagotech.com/isolationamplifiersYou can use those isolation amps on the current across the resistor as well.If you need isolation on the current and don't need super high resolution, check out hall sensors like:http://www.allegromicro.com/en/Products/Current-Sensor-ICs/Zero-To-Fifty-Amp-Integrated-Conductor-Sensor-ICs.aspx

author: robertj352003
author_rank: Newbie
timestamp: January 06, 2013, 09:31:00 am
content: I need roughly .9 resolution with maybe the speed of a cheap multimeter. As far as interface goes how do you mean?

author: PA0PBZ
author_rank: Super Contributor
timestamp: January 06, 2013, 09:58:34 am
content: Quote from: robertj352003 on January 06, 2013, 09:31:00 amWhere do you want the results to go?

author: ve7xen
author_rank: Super Contributor
timestamp: January 06, 2013, 10:23:17 am
content: Any microcontroller with an ADC should be able to handle this. You need less than 8 bits of resolution.Maybe some prebuilt panel meters from China are more appropriate for your project though?

author: Shred
author_rank: Contributor
timestamp: January 07, 2013, 08:52:07 pm
content: Have you seen the INA169?Adafruit have a breakout board for it:http://www.adafruit.com/products/1164http://www.adafruit.com/datasheets/ina169.pdfI've been playing around with the INA219, which also measures voltage, but it doesn't meet the O.P.'s voltage requirements.

author: tbbw
author_rank: Contributor
timestamp: January 13, 2013, 06:46:07 am
content: Quote from: Shred on January 07, 2013, 08:52:07 pmHa!It did not take me long to find someone with just the post i was looking for here
Confusion about PIC18F4450 PIC18F2550 pin, ICSP - Page 1
Forum section: electronics / general

author: montcler
author_rank: Contributor
timestamp: November 08, 2012, 12:05:58 pm
content: Hello,I wonder if the pin 12 (NC/ICPGC) and 13 (NC/ICPGD) pic PIC18F4450 TQFP (44-Pins) (although this carry the same on pins 15 and 16) are equivalent and do exactly the same as the Pic PIC18F2550 DIP (28Pins) Pin 27 (RB6/PGC) and 28 (RB7/PGD), when programmed via ICSP. Apto.25 311 Pag-9. the datasheet.PIC18F4450 PIC18F2550P.12 (NC / ICPGC) = P.28 (RB7/PGD)P.13 (NC / ICPGD) = P.27 (RB6/PGC)THX.

author: JVR
author_rank: Regular Contributor
timestamp: November 09, 2012, 07:27:28 am
content: They do the same thing, the difference is that on the 4450 you dont lose IO, as those pins are reserved for ICSP

author: montcler
author_rank: Contributor
timestamp: November 09, 2012, 12:13:35 pm
content: Hello,You mean I can get more pins RB6 assigned (PGM) and RB7 (PGC) of PIC18F445 pic.Since these pins apart PIC18F4550 is free to ICSP programming instead of using the RB exclusively ..Thanks.

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: November 09, 2012, 09:46:32 pm
content: The data sheet is the best reference on this. The pin out diagram has a footnote for 44 pin devices, referring to section 25.9, which says:QuoteSo yes, you can use the alternative pins for ICSPprovidedyou set the proper configuration bit via the normal ICSP pins.

author: montcler
author_rank: Contributor
timestamp: November 10, 2012, 10:02:43 pm
content: Hello,I'm angry because ... Imagine that we have a PCB that will track special ports 12 (ICPGC) and 13 (ICPGD) instead of 16 (RB6/PGC) and 17 (RB7/PGD) tracks are already made to schedule these pins. For if before using special pins I have to program them first by RB6 and RB7 and then activate the Fuse "ICPRT", would have to put in the PCB jumpers for programs after the first PIC and disable jumpers for programming by the second special port. Instead of saving those tracks would have to put four tracks instead of two.Am I wrong or not? ...Thank you.

author: Smokey
author_rank: Super Contributor
timestamp: November 12, 2012, 04:13:33 am
content: I'm using the 44-Pin TQFP 18F4458 in a couple boards I'm doing now. It's all the same family. I'm using only the dedicated ICSP pins to do programming with an ICD2 clone. The shared pins are allocated for other stuff. The only issue I had was I originally forgot to set the dedicated ICSP fuse in the MPLAB fuse setup. Assuming that fuse is set in the software config, it acts the same as any other PIC I've ever used with shared ICSP pins. You should be fine.As a side note about those 8 bit USB PICs, if all you are using the USB for is a virtual serial port, the USB CDC PIC code takes up a HUGE piece of memory. Plus bootloading with USB isn't as straightforward as with the TX/RX lines. I'd say stick with the FTDI solution unless you need bulk transfer or HID or something.
GA144 - Page 1
Forum section: electronics / general

author: mark5009
author_rank: Contributor
timestamp: November 05, 2012, 02:14:42 am
content: Has anyone had any experience with the GA144?http://www.greenarraychips.com/home/products/index.htmlLike most Chuck Moore design, it looks brilliantly left-field...

author: McMonster
author_rank: Frequent Contributor
timestamp: November 05, 2012, 06:45:28 am
content: Looks brilliant, I'd like to get my hands on the eval board, but I don't have enough money to spare right now. I'll pass the link to some of the people on my university.

author: poorchava
author_rank: Super Contributor
timestamp: November 06, 2012, 10:47:36 am
content: 0.4mm QFN... And here goes any DIY activity involving that chip.What will you get from developing anything with the eval board, when you cannot build any device with it, without involving high precision assembly machinery. I that was normal 0.5mm pitch QFN or any kind of QFP....
PIC18f4500 usb programming - Page 1
Forum section: electronics / general

author: Bibiricat
author_rank: Contributor
timestamp: October 27, 2012, 10:06:25 am
content: Hello.I recently managed to program the Microchip bootloader into my PIC18F4550, got MPLab, and found some blinking LED code on the net. However, i am not sure if that will work with my MC ( i don't want to overwrite the bootloader) . Besides that, i have no idea how to upload the hex file made by MPLab into the MC via USB.Can anyone help me ?

author: PA0PBZ
author_rank: Super Contributor
timestamp: October 27, 2012, 03:05:06 pm
content: Hi,I used the software Microchip made for the demo board, including an application to upload user software using the bootloader.Read the demo board user guide, and install the MCHPFSUSB v2.2 USB Framework, both can be found here:WWW.SecureSoftwareList/secsoftwaredownload.aspx?device=en021940#]http://www.microchip.com/Microchip.[url=http://WWW.SecureSoftwareList/secsoftwaredownload.aspx?device=en021940#]WWW.SecureSoftwareList/secsoftwaredownload.aspx?device=en021940#

author: Bibiricat
author_rank: Contributor
timestamp: October 27, 2012, 09:54:14 pm
content: Hi PA0PBZ.The link you have provided is not working, however i am looking for that framework.

author: PA0PBZ
author_rank: Super Contributor
timestamp: October 28, 2012, 08:22:22 am
content: Hmm, not sure what went wrong there, look at the bottom of this page:http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en021940

author: Bibiricat
author_rank: Contributor
timestamp: October 28, 2012, 03:00:54 pm
content: For the pic newbies (like me ), i found this. It gives step-by-step instructions, and example programs.http://erricous.free.fr/ELECTRON/boot4550_en.html
PICKIT3 standalone programmer/scripting tool 3.0 (beta) issues with PIC32MX1/2 - Page 1
Forum section: electronics / general

author: joseph.anand
author_rank: Regular Contributor
timestamp: July 31, 2012, 09:24:53 pm
content: I seem to be having problems using the new PICKIT3 Scripting tool v3.00 BETA and the PIC32MX1/2 series (or at least the PIC32MX250F128D) . This is my first attempt with the PIC32 series and so I wired it will all the necessary connections (including decoupling caps between VDD and VSS and 10uF tantalum on VCAP/VDDCORE) on a general purpose (aka prototyping) board. Everytime I attempted detection of the PIC32MX on my development board it would fail asking me to check the capacitor on VCAP. I verified and re-verified the connections and the darn thing would still not detect it. After wasting more than a couple of hours and considering the possibility of having a spoiled uC, I just fired up MPLAB and voila it detected the device. I was able to get a basic LED test routine working without issues.So it looks like the PICKIT3 Scripting tool has issues with the PIC32MX1/2.I am posting this just to ensure that others do not run into the same problem.

author: JTR
author_rank: Regular Contributor
timestamp: August 10, 2012, 05:17:21 am
content: My understanding is - without having verified though, that the scripting tool is a direct port of the pickit 2 script and as such does not support the PIC32MX1/2 family. Last time I looked there certainly was not support for these pics with the Pickit 2 and microchip's wares.However there is an open source app though that will program these parts with the pickit 2.http://code.google.com/p/pic32prog/wiki/READMEAnd a debugger by the same author:http://code.google.com/p/ejtagproxy/The author of these apps "expects" them to work with the pickit 3 when loaded with the scripting tool.

author: Vasi
author_rank: Regular Contributor
timestamp: October 08, 2012, 06:54:41 am
content: The last version of PIC32Prog adds support for MX1/MX2 family. Finally, I can use my Pickit2 to program them. Thanks Serge!
FRDM-KL25Z Kinetis L Series Freedom Development Board - Page 1
Forum section: electronics / general

author: andyg
author_rank: Regular Contributor
timestamp: October 04, 2012, 01:25:34 am
content: New ARM Cortex-M0 board recently released, 128K flash MKL25Z128VLK4, 16K SRAM with USB OTG, touch slider, accelerometer, Arduino pinouts.http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-KL25ZJust got mine today from Element 14 for around $12 (not including postage, but i ordered together with a few other things I needed)

author: poorchava
author_rank: Super Contributor
timestamp: October 04, 2012, 06:52:29 am
content: Not available cheaply in Europe as far as i can tell. Only places where it's available are Digikey and Mouser, both of which have >$30 shipping fees to my country. -1 to number of buyers so far :/I thought that since you bought it from Element 14, it will be available from Farnell, but apparently that's not the case
PWM using Photoresistors - Page 1
Forum section: electronics / general

author: sgonzalezp
author_rank: Newbie
timestamp: September 27, 2012, 03:40:16 am
content: Hi I'm new to interfacing the PIC micro controllers... I have begun by using a PIC18F4550 and using simple LED applications to get started with the interfacing... My scope for my project though includes using photo resistors as an input for the PIC would analog or digital be best? For the LEDS on the output I was thinking digital because it is based on a scale from 1-255 correct in terms of brightness/dimness. I would like it so that several photoresistors are in series with one another and depending on how man of the photo resistors the user waves their hand across or the velocity...will determine the duty cycle of the leds in series in a contrasting background...I'm not asking for the answer, I'm asking for all the right resources and/or references for doing this because it is part of my assistive technology project and I'm ambitious to make this happen!THANKS in advance!

author: johnnyfp
author_rank: Frequent Contributor
timestamp: September 27, 2012, 03:16:05 pm
content: I'm assuming that you are choosing the 18f4550 because it's readily available in dil package, and want other bread board or Vero board it? Reason I ask is there are better pic chips with more PWM outputs in a smaller package that might be better suited for example pic18f27j53 which has 10 Adc and 10 PWMProbably the simplest circuit would be to putty the ldr in a resistor voltage divider connected to the adc ports and then drive the leds with a resistor directly from the pwd ports.Sample the adc and convert into a duty to output. After getting that working you can start playing with multiplexing the output to get more leds and start doing some funky stuff.Keep it simple to start off with, both in code and hardware then build on that.
EFM32 technical forum and low power design contest - Page 1
Forum section: electronics / general

author: Andlier
author_rank: Contributor
timestamp: September 25, 2012, 01:46:56 pm
content: If you have any low power project ideas and want a starter kit similar to the one Dave reviewed earlier this year:http://www.eevblog.com/2012/04/22/eevblog-269-energy-micro-tiny-gecko/: this is a good opportunity.Energy Micro just launched their technical forum and with it a design contest open until late October.http://forum.energymicro.com/topic/150-contest-description/Anders(currently an EM employee)

author: Bored@Work
author_rank: Super Contributor
timestamp: September 25, 2012, 04:49:39 pm
content: Hello,I couldn't find any information about the contest details. In particular who owns the intellectual property rights of submissions (winning and otherwise). This was of some concern here in the past, when we looked at other contests.Equally important, who is responsible for incidents? In the past we saw contests where the contest organizer wanted to be granted all rights to the submissions ("worldwide", "unlimited", "perpetual", ...), including reselling rights, but wanted to hold the submitters responsible for all that what could possibly go wrong ("hold harmless").I.e. rules were tilted heavily towards the contest organizer and wer designed to suck the lifeblood out of submitters.What are your rules?

author: Andlier
author_rank: Contributor
timestamp: September 26, 2012, 01:24:53 pm
content: Quote from: Bored@Work on September 25, 2012, 04:49:39 pmHi again,Thank you for your valuable input, our motivation for the contest is to inspire forum members and new potential members to think about and discuss different low power project ideas based on the EFM32 technology. We do not have the intention of taking over the intellectual rights to ideas or publishing source code etc. if the contestant does not want to do so herself. We have revised the contest rules to reflect this.-Anders
Adding STM32F4 peripheral lib to Keil project - Page 1
Forum section: electronics / general

author: Torrentula
author_rank: Regular Contributor
timestamp: September 16, 2012, 04:29:43 pm
content: Hey guys!Because of the recent uprising STM32F-Series posts in here I thought I'd give the STM32F4 another chance. I have given up trying to use GCC loads of errors because filenames and locations are changing frequently.So now I'm trying to add the STM32F4 peripheral library to my project in the Keil IDE. I have tried adding it as a group but when I try to compile it, the compiler complains about 'assert_param' being defined implicitly.I'm sure there should be some simple fix (maybe a file I have forgotten to include) but I can't seem to figure it out...Thanks in advance

author: Bored@Work
author_rank: Super Contributor
timestamp: September 16, 2012, 04:52:32 pm
content: Quote from: Torrentula on September 16, 2012, 04:29:43 pmThat statement doesn't make sense.QuoteThat can't be. We have just been told that Keil is painless and worry-free.

author: Torrentula
author_rank: Regular Contributor
timestamp: September 16, 2012, 05:48:41 pm
content: Okay I might not have been very precise so I'll try again:I need to somehow include the STM32F4 peripheral library provided by ST into my Keil project so I can use the peripherals like USART, SPI, I2C etc. without having to care about setting each individual bit (quite cumbersome to do this e.g. for all 4 USARTs).I believe Keil is painless after you've got everything set up correctly. Until then there are quite a lot of obscure menus which you need to figure out.

author: Mechatrommer
author_rank: Super Contributor
timestamp: September 17, 2012, 03:33:03 am
content: Quote from: Torrentula on September 16, 2012, 05:48:41 pmyou mean.. anykind of softwares/IDEs? paid or unpaid?if you are me, and i dont know shit where that 'assert_param' located, i'll either1) step debug it until it reaches there.2) start a brute force search for keyword 'assert_param' in every related folders.3) both (1) and (2) and (1) again and (2) etc etc

author: andersm
author_rank: Super Contributor
timestamp: September 17, 2012, 11:59:29 am
content: In ST's STM32F1 libraries, the assert_param macro is defined in the stm32f10x_conf.h header file which is included in the project templates. I don't remember how/where you were supposed to #include the header, but I assume the STM32F4 libs have a similar setup.BTW, one big annoyance I had with Keil's IDE is that it always, unconditionally adds its bundled copy of the firmware library to your include paths. If you try to add another version to your project, you'll get completely insane, undiagnosable build errors until everything is configured exactly right.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: September 17, 2012, 03:31:01 pm
content: can you put in ifdef directive in?
AVR programming - Page 1
Forum section: electronics / general

author: blackjames
author_rank: Regular Contributor
timestamp: September 11, 2012, 10:07:14 am
content: hey guys, does anyone know if i can program a ATtiny45 or ATtiny85 via this:https://www.sparkfun.com/products/9825avr programmer from sparkfun electronics with arduino software. i think 15 dollars is a good buy, even if i dont like it.

author: firewalker
author_rank: Super Contributor
timestamp: September 11, 2012, 10:14:44 am
content: Yes you can use it to program the ATtiny45/85 via ISP.If the Arduino software supports the above micros then it will be trivial to program the target directly with any programmer supported by avrdude.Alexander.

author: blackjames
author_rank: Regular Contributor
timestamp: September 11, 2012, 10:17:06 am
content: thanks. ill order one from australian robotics tomorrow if they're in stock

author: phil_jp1
author_rank: Regular Contributor
timestamp: September 11, 2012, 10:19:58 am
content: Quote from: blackjames on September 11, 2012, 10:07:14 amYes, you can! It'll do for all basic AVR micros. But it will not work for XMega series and for ATtiny10(and a few other 6-legged micros) (because they have a different programming interface, other than SPI)

author: blackjames
author_rank: Regular Contributor
timestamp: September 11, 2012, 10:27:57 am
content: it turns out australian robotics dosent sell them but little bird electronics does. does anyone know if you can get it for less than $23.60 including shipping to melbourne australia?

author: firewalker
author_rank: Super Contributor
timestamp: September 11, 2012, 11:35:09 am
content: Search for USBtiny.http://www.ebay.com/itm/USBTINY-AVR-Programmer-6pin-and-10pin-leads-CD-/221119964944?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item337bc6e710Alexander.

author: aluck
author_rank: Regular Contributor
timestamp: September 11, 2012, 11:43:59 am
content: Here is a $5 one for you, pal:http://dx.com/p/usb-isp-programmer-for-atmel-avr-atmega-attiny-51-board-148046?item=3
Atmel Studio 6, MS Visual Studio 2012 on Win8 - Page 1
Forum section: electronics / general

author: btfdev
author_rank: Contributor
timestamp: September 10, 2012, 05:18:38 pm
content: Hello AVR folksPast weekend, we did Atmel Studio 6, MS Visual Studio 2012 on Windows 8 preview release (32bit). Well, it was not pretty but for those who interested to know what happened.http://www.binarytaskforce.com/Weblog/2012/09/10/atmelstudio6In short, it is still a long way to AVR Nirvana!Cheers, Team BTF.

author: firewalker
author_rank: Super Contributor
timestamp: September 10, 2012, 05:30:57 pm
content: Yep... Atmel's new software (v 5, v 6) is a shoot on the foot with an RPG.Alexander.

author: enz
author_rank: Regular Contributor
timestamp: September 10, 2012, 06:04:03 pm
content: Why complaining?Atmel does not claim Windows 8 compatibility.Martin

author: firewalker
author_rank: Super Contributor
timestamp: September 10, 2012, 08:14:52 pm
content: I am am complaining for the "Cross Platform" thing. Mainly for GNU/Linux.Alexander.

author: poptones
author_rank: Frequent Contributor
timestamp: September 11, 2012, 05:49:37 am
content: LOL. Speaking of cross platform...ALERT: THE THUMBNAILS SLIDER IS TOO WIDE!thumbsPercentReduction and/or buttonsWidth needs to be scaled down!Anyway, why does this matter if you're using gnu? I'm curious about the article enough to read, but it really doesn't matter to me one way or another since I use unity.
C18 Compiler Installation on Mac OSX 10.8  - Page 1
Forum section: electronics / general

author: sgonzalezp
author_rank: Newbie
timestamp: August 11, 2012, 09:27:38 pm
content: I installed MPLAB IDE and it works fine...I downloaded the installer file for C18 compiler and used crossover to install it...when attempting to setup a new project it says C18 not found.... why? Help please.

author: PedroDiogo
author_rank: Regular Contributor
timestamp: August 11, 2012, 10:47:42 pm
content: Isn't crossover a program to install windows Apps on the Mac? Most of the Microchip C compilers are available as native apps for Mac.However, if you're using MPLAB X try this:Go to Preferences -> Embedded -> Scan for Build ToolsAlso check if you have installed the plugin "toolchainC18" (Tools->Plugins)

author: ivan747
author_rank: Super Contributor
timestamp: August 31, 2012, 12:31:09 am
content: You have to download the Mac version. It comes with an installer and everything.
Return value is not updated in Arduino? - Page 1
Forum section: electronics / general

author: Mr1234kaki
author_rank: Contributor
timestamp: September 08, 2012, 12:02:52 pm
content: Hi there, please help me,ive been working on this for a week already,//The circuit will have 3 buttons, one for change mode, one for set the value and another one will count the number of button pushes,//The circuit will initially start at 25, after change mode button is pushed once, the program will jump to fucntion count//the initial value will be added with the number of button being pushes//The set button is push so we can return the new value to the main loop function//If we push the button mode once more, the program will jump to function count2//at count2, the function suppose to decrease the value as we set before corresponding to the number of button push being pushes// eg. (initial Y=25, >>>> set to Y=30 >>>> decrease back to Y=23 from Y=30)//problem happens after executes function counter,//once we updated the final value Y, we return to main loop and display the final value on the lCD//but when we move to counter2, the final value Y is not updated from what we have done before, instead it will decrease from the intial value//eg. initially Y=25 >>>>>> press buttonmode to HIGH >>>> counter (add value to initial value 25) >>>> (press buttonset to HIGH) set value to Y=30 >>>> press buttonmode to HIGH again//>>>> counter2 (should decrease value from Y=30 but Y is not updated and decrease Y from intial 25 instead) >>> (press buttonset to HIGH) set value Y=27 for example)Thank you very much, Cheers!

author: PeterG
author_rank: Frequent Contributor
timestamp: September 08, 2012, 12:21:44 pm
content: Seems to me your using too many variables. Try removing x and y.You should be able to do this with just pushcounter and pushcounter2.Regards

author: PA0PBZ
author_rank: Super Contributor
timestamp: September 08, 2012, 07:24:02 pm
content: In counter2() you are doingy=x - pushcounter2;which uses the original value of 25 again since you are not changing it anywhere. I understand that you want to display the new value each time the button is pressed, so:- make both x and y volatile and initial 25- start both counter loops withx = y;- use the x to display the results when the button is pressed:x = x + pushcounter;(or - for counter2)delay(500);lcd.clear();lcd.setCursor(0,0);lcd.print(x);- then when exiting the counter loop doy = y + pushcounter;(or - for counter2)That should work.And I agree with PeterG that you are using too many variables

author: grumpydoc
author_rank: Super Contributor
timestamp: September 08, 2012, 08:22:47 pm
content: QuoteNot to mention too many (almost) identical functions.
50% Discount on TI kits from Element14 India - Page 1
Forum section: electronics / general

author: joseph.anand
author_rank: Regular Contributor
timestamp: August 15, 2012, 07:12:14 am
content: As part of the TI MCU DeepDive Technical Program, Element14 India is offering a 50% discount on some development boards from TI including the Beaglebone and Beagleboard.

author: andyg
author_rank: Regular Contributor
timestamp: August 15, 2012, 01:04:59 pm
content: I checked the India site, Beagleboard has no stock, and both Beagleboard and Beaglebone on the India site is still a lot more expensive than Digi-Key and other distributors anyway.

author: metalphreak
author_rank: Frequent Contributor
timestamp: August 17, 2012, 09:10:07 am
content: Cool. I would assume this is only limited to orders delivered within India? Good to see deals for everyone being posted with the forums worldwide audienceNot everyone lives in America or Australia!
Genius G540 Programmer for PICs - Page 1
Forum section: electronics / general

author: DJKA
author_rank: Contributor
timestamp: August 14, 2012, 02:01:49 pm
content: Hi, anyone has an opinion abouthttp://goo.gl/HdWnwprogrammer? Is it worth buying?Basically, all I want is to flash PIC16Fxx MCUs and looking for really cheap but working solution... Pickit2/3 is too expensive for me.Thanks!

author: PedroDiogo
author_rank: Regular Contributor
timestamp: August 15, 2012, 01:31:32 am
content: I think most PIC16 you could just flash using a simple Parallel Port Programmer. You could just breadboard one really quick.However I don't think, like T4P said, if you plan to do any serious work with PIC microcontrollers you should just buy a Pickit (even a clone works pretty well).

author: joseph.anand
author_rank: Regular Contributor
timestamp: August 15, 2012, 06:50:36 am
content: While I built many parallel and serial pic programmers before, the first USB PIC programmer I built (way back in 2007) and really liked is the Pic Brenner 8 from sprut.de. It is way faster than either the PICKIT3 or the PICKIT2 when it comes to programming and is my backup programmer. It should be fairly easy to get it up and running on a prototyping board. But you need to have access to an existing pic programmer to burn the firmware into the PIC8F2550. The provider software for burning has good support for most 8 and 16bit PICs.But I think getting your hands on a PICKIT 2 clone is a better option.

author: DJKA
author_rank: Contributor
timestamp: August 16, 2012, 10:48:28 am
content: Thanks for your replies guys, I will try paralell "programmer" first, I don't want to waste $$ for Pickit2/3 just for a few PIC projects... Gonna have to find an old PC with working RS232 port though...
Duinomite Mega - Page 1
Forum section: electronics / general

author: DFW2012
author_rank: Newbie
timestamp: August 05, 2012, 04:00:27 pm
content: Hey DaveI am hoping you can help some us "Prius Chat" forum people out. The duninomite mega is being used by some of "Prius" people to develop a hardware/software interface to better manipulate the "EV" (electric vehicle only) function on the Prius. The timing, speed, and code are the challenge. I am hoping you and my online friend Lopez can meet,contact, and or exchange ideas. He is from down under...... thanksAlso if you have suggestion on small VGA Monitors and LCD that would connect to the Duinomite........and what each interface means(uext... rs232....gpi020........ can

author: DFW2012
author_rank: Newbie
timestamp: August 13, 2012, 05:47:19 pm
content: any1 in here

author: johnboxall
author_rank: Unknown
timestamp: August 15, 2012, 05:07:32 pm
content: There aren't too many maximite fans around here...
arduino keypad help needed! - Page 1
Forum section: electronics / general

author: blackjames
author_rank: Regular Contributor
timestamp: August 02, 2012, 09:14:36 am
content: hi, recently i downloaded the arduino keypad library, and opened one of the example sketches. for some reason, the IDE doesnt approve the program when i press "verify". does anyone know why this happens.here is the program:#include <Keypad.h>const byte ROWS = 4; //four rowsconst byte COLS = 3; //three columnschar keys = {{'1','2','3'},{'4','5','6'},{'7','8','9'},{'#','0','*'}};byte rowPins = {5, 4, 3, 2}; //connect to the row pinouts of the keypadbyte colPins = {8, 7, 6}; //connect to the column pinouts of the keypadKeypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );void setup(){Serial.begin(9600);}void loop(){char key = keypad.getKey();if (key != NO_KEY){Serial.println(key);}}

author: dda
author_rank: Contributor
timestamp: August 02, 2012, 09:32:12 am
content: It compiles fine for me (Arduino 1.0.1). Is the Keypad folder in the libraries folder?

author: blackjames
author_rank: Regular Contributor
timestamp: August 02, 2012, 09:37:09 am
content: i think it dosent work because i have arduino 1.0, and it is in the libraries folder.

author: Chet T16
author_rank: Frequent Contributor
timestamp: August 02, 2012, 09:59:29 am
content: What error?

author: bsiswoyo
author_rank: Newbie
timestamp: August 09, 2012, 12:57:32 am
content: To create keypad for easy, use adc of ATmega on arduino.Visit:http://bsiswoyo.lecture.ub.ac.id/2012/02/keypad-using-adc-a-microcontroller-application/Best regardBambang SiswoyoQuote from: blackjames on August 02, 2012, 09:14:36 am
News: IAR Eclipse Plugin (finally..) - Page 1
Forum section: electronics / general

author: phil_jp1
author_rank: Regular Contributor
timestamp: August 27, 2012, 03:01:50 am
content: Good news for those who use IAR Embedded Workbench for ARM platform!IAR finally released (actually, a couple of month ago) official Eclipse plugin for ARM and a few other platforms.It is still lacking support for some debuggers, and some other things, but it is usable.It's a great news for those who use IAR EWB (which is, IMHO, one ancient IDE) for ARM platform.http://www.iar.com/en/Products/Eclipse/http://eclipse-update.iar.com/It is not very fresh news, but many people still don't know about it.P.S. If you're working with ARM, what IDE/ToolSet do you use?
MPLAB X Migration - Page 1
Forum section: electronics / general

author: itdontgo
author_rank: Regular Contributor
timestamp: August 05, 2012, 02:08:45 pm
content: Hi,I found a bug with the PICkit3 and MPLAB v8 so took the plunge and installed MPLAB X.My first impressions were that it had a whiff of the kids toys about it; a bit like when I went from W2K to XP. I suppose I got used to it.The big disappointment was that I'm too busy to play games trying to figure out the new features and realised instantly my v8 projects wont load. Do I have to start a new project and build my asm files etc... or is there a quick way?Michael

author: djsb
author_rank: Super Contributor
timestamp: August 05, 2012, 02:15:33 pm
content: You can use the link to the import wizard on the introductory screen for V8 projects. This works OK apart from a couple of warning messages (which I ignore-maybe unwisely). The hex file produced can be a bit difficult to find as it's not put in the same directory as the projects source file. Easy enough to search for by file extension and date stamp though. I've opened and compiled CCS C based V8 projects and they have worked fine. I use XP so YMMV with W7.David.