hybridfree/eevblog-posts huggingface dataset:
STM32F4 Disco board AREF mod - Page 1
Forum section: electronics / general

author: Harvs
author_rank: Super Contributor
timestamp: September 06, 2013, 02:56:59 am
content: A quick write up on shifting the AREF input off the main 3.0V reg to the 2.5V reg, which if you're not using the audio DAC is much quieter.http://www.electronicsinoz.info/stm32f4-disco-board-aref-mod/

author: mrflibble
author_rank: Super Contributor
timestamp: September 06, 2013, 06:59:54 am
content: Hey, that looks like it might come in handy. Thanks!

author: Harvs
author_rank: Super Contributor
timestamp: September 06, 2013, 09:36:59 am
content: No problems, hopefully it does come of some use.I'm just assuming that putting this sort of stuff on a webpage and posting a link is easier for the end user than putting it all in a post?

author: mrflibble
author_rank: Super Contributor
timestamp: September 06, 2013, 11:43:22 am
content: Right now, yes. Depends really on how many years you intend for it to be hosted vs how long a forum post sticks around. But personally I am all for how you're doing it right now. I tend to mirror useful hobby pages anyways, so no problem if next year it went *poof*.
PIC16F1829 i2c Problem - Page 1
Forum section: electronics / general

author: Trabbo93
author_rank: Contributor
timestamp: August 19, 2013, 02:29:08 pm
content: Hi, I was trying to use MSSP on my PIC to write to a serial eeprom but I encountered a problem writing some i2c routines. After successfully generating the start condition I try to send the control byte to the slave and two things happen..1) hardware sets BCL2IF2) both SDA and SCL lines go to 5Vthe module remains in idle state and does not send other data. what that looks me strange is the fact that the bus collision flag is set during data transmission, because in the datasheet of the device this condition is not even mentioned.there is my code, I adapted it from Plibs included in XC8 compilers..Code:void I2Csetup(){SSP2CON1 = 0b00001000;APFCON0bits.RXDTSEL=1;APFCON0bits.TXCKSEL=1;TRISBbits.TRISB5 = 1;TRISBbits.TRISB7 = 1;ANSELBbits.ANSB5 = 0;ANSELBbits.ANSB7 = 0;INLVLBbits.INLVLB5 = 0;INLVLBbits.INLVLB7 = 0;SSP2STATbits.CKE = 0;SSP2STATbits.SMP = 1;SSPADD = 0x27; //Clock 100KHzPIR4bits.SSP2IF = 0;PIR4bits.BCL2IF = 0;SSP2CON1 = 0b00101000;SSP2CON2 = 0;}void I2Cstart(void){SSP2IF = 0;BCL2IF = 0;SSP2CON2bits.SEN = 1; //Start I2Cwhile(!PIR4bits.SSP2IF);}void I2Cstop (void){PIR4bits.SSP2IF = 0;SSP2CON2bits.PEN = 1; //Stop I2Cwhile(!PIR4bits.SSP2IF);}void I2Crestart(void){PIR4bits.SSP2IF = 0;SSP2CON2bits.RSEN = 1; //Restart I2Cwhile(!PIR4bits.SSP2IF);}void I2Cwait(void){while ( ( SSP2CON2 & 0x1F ) || ( SSP2STATbits.R_nW ) )continue;}bit I2Cwrite(unsigned char dat){PIR4bits.SSP2IF = 0;SSP2BUF=dat;I2Cwait();while(SSP2STATbits.BF && !PIR4bits.SSP2IF);PIR4bits.SSP2IF = 0;return ~SSPCON2bits.ACKSTAT;}unsigned char I2Cread(char ack){unsigned char temp;SSP2CON2bits.ACKDT = ack;PIR4bits.SSP2IF = 0;SSP2CON2bits.RCEN = 1;while(!PIR4bits.SSP2IF);temp = SSP2BUF;PIR4bits.SSP2IF = 0;SSP2CON2bits.ACKEN = 1;while(!PIR4bits.SSP2IF);return temp;}I use 4.7k pull up on both SDA and SCL
GPIB IEEE 488 - Pic Library - Page 1
Forum section: electronics / general

author: Clint
author_rank: Regular Contributor
timestamp: August 16, 2013, 02:21:41 pm
content: Afternoon all, anyone know of a PIC Based Library for the HP GPIB / IEE488 bus ?

author: Skimask
author_rank: Super Contributor
timestamp: August 16, 2013, 11:28:59 pm
content: Which PIC?Which language?Which which which?Which Google did you use?

author: Clint
author_rank: Regular Contributor
timestamp: August 17, 2013, 06:55:48 am
content: Ill take a library from any pic for now.I have both C and BASIC...Is Which a place ? do they speak English in Which ?I used the Google I own shares in and I refuse to use any other google on that basis.RegardsClint

author: Unknown
author_rank: Unknown
timestamp: August 17, 2013, 01:03:12 pm
content: What Skimask means is thata quick Google searchgives at least four relevant hits on the first page. If you did a careful evaluation on each of these and determined that none of them meets your detailed requirements, then it would be good to share this and said requirements so people don't waste their time trying to help you. Otherwise I just gave you four options.
USB to I2C adapter and EVAL boards? - Page 1
Forum section: electronics / general

author: AcHmed99
author_rank: Contributor
timestamp: August 28, 2013, 06:37:57 pm
content: I’m looking at theADP1048which is a digital PFC controller for interleaved and bridgeless boost PFC. The chip looks interesting but theUSB to I2C adapterfor loading the register settings from the GUI is a little pricey over $300.00.I’ve found plenty of cheap as in 20 to 50 buck USB to I2C adapters which make me wonder what’s the difference with the AD one that it’s so pricey. TI even has one for some of their evaluation boards for only 50 bucks. What do they all use some propriety protocol or something?Anybody ever use any of these EV boards that require USB to I2C and if so were you successful with a cheap adapter from digikey.

author: DavidDLC
author_rank: Frequent Contributor
timestamp: August 28, 2013, 06:56:20 pm
content: Just use a FT232H board for I2C communication, but you need to write the code for it.I thinnk the software development is what makes this adapters expensive. Hardware is not that difficult a simple FT232H or a Microcontroller with I2C will make the job.David.

author: plesa
author_rank: Frequent Contributor
timestamp: August 28, 2013, 07:49:53 pm
content: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en028600It is about 45USD and if you have a PIC18F2550 available you can built on your own, schematic and firmware is available on Microchip website above.

author: DavidDLC
author_rank: Frequent Contributor
timestamp: August 28, 2013, 07:53:43 pm
content: Bus Pirate will also make the work, and it already has an interface to work with I2C.http://dangerousprototypes.com/docs/Bus_PirateDavid.

author: jonmarx
author_rank: Contributor
timestamp: August 28, 2013, 07:55:09 pm
content: Be a bit careful with some of those cheap USB-to-I2C adapters. I bought one based on the FTDI FT201X IC only to discover that it could only act as an I2C slave. For your application I assume you need a master.Have you considered using a Bus Pirate?

author: plesa
author_rank: Frequent Contributor
timestamp: August 28, 2013, 08:44:09 pm
content: Quote from: DavidDLC on August 28, 2013, 07:53:43 pmCons of BusPirate is the terminal, is there any PC application with GUI?

author: mrflibble
author_rank: Super Contributor
timestamp: August 28, 2013, 09:23:30 pm
content: How about this versatileUSB to quite a few protocolsadapter. Costs only $25 at digikey. "All" that is required is typing some verilog/vdhl code.Although to be fair, I2C master is probably easier to do with a microcontroller. Especially if you need multi-master and multi-speed, that's totally annoying to implement yourself.

author: jonmarx
author_rank: Contributor
timestamp: August 28, 2013, 10:21:26 pm
content: It's not quite the same one as I had but I think it is still only a slave because the clock (SCL) signal is described as an input. Also I just spotted on page 12 of the FT200XD data sheet: "The FT200XD device only operates as a slave..."
Cheap ARM Cortex-M4F Microcontroller board. - Page 1
Forum section: electronics / general

author: Crazy Ape
author_rank: Regular Contributor
timestamp: August 15, 2013, 04:51:28 pm
content: Just got email from TI, they've dropped the price of their ARM Cortex-M4F launchpad to $7.99I bought two of these a while back and am yet to get a chance to play with them.The Stellaris LM4F120H5QR Microcontroller has:* 32 KB single-cycle SRAM* 256 KB Flash memory* 2KB EEPROMStellaris LM4F120H5QR Microcontroller Datasheet (1191 Pages!!)http://www.mouser.com/ds/2/405/lm4f120h5qr-124014.pdfTI's shop:http://links.mkt102.com/ctt?kn=3&ms=NDIzMDY5OTES1&r=OTI4Mzg3NzU5OAS2&b=0&j=MTk4NjkyOTU3S0&mt=1&rt=0

author: andersm
author_rank: Super Contributor
timestamp: August 15, 2013, 07:02:18 pm
content: I'm guessing they're selling off old stock, that board has been replaced by theEK-TM4C123GXLwhich still costs $12.99.EDIT: If you buy one of these boards, be sure to read theerrata listas well.

author: Crazy Ape
author_rank: Regular Contributor
timestamp: August 15, 2013, 07:10:14 pm
content: Quote from: andersm on August 15, 2013, 07:02:18 pmYeah, that's my guess as well, there is a big note in red on the product page of the Stellaris launchpad I linked to. It's still an interesting board if you're trying to get into ARM architecture.And yes, the errata list is quite large. I ordered the two I have on 9/8/2012 and received the A3 version of the chip. I'm not sure what is shipping on the current models though.

author: Stonent
author_rank: Super Contributor
timestamp: August 16, 2013, 12:33:46 am
content: QuoteFinally! I'm getting tired of collecting all these Mini B cables! It least Micro B can be used to charge modern devices in a pinch and not an old blackberry or ancient HTC phone.QuoteQuoteLol wut?
Overloaded output? Arduino mega (Atmel) - Page 1
Forum section: electronics / general

author: superUnknown
author_rank: Regular Contributor
timestamp: July 29, 2013, 01:17:09 pm
content: I've been hooking up a speaker thru a pot and directly to PWM pins on an Arduino. I've noticed that it's loud for a few seconds and then is rather faint thereafter. There's still output, just less volume. When I try a new pin, same thing...I've hooked it up according to the book "Arduino Cookbook" What gives? Have I fried the pins permanently? What is happening on a MCU level?

author: c4757p
author_rank: Super Contributor
timestamp: July 29, 2013, 01:55:25 pm
content: 1) Probably. 2) What kind of speaker?

author: Psi
author_rank: Super Contributor
timestamp: July 29, 2013, 02:14:52 pm
content: Connect to the i/o through a 200R resistor, that will stop the speaker from drawing too much current.Another thing to investigate is backemf being generated by switching the inductor (speaker).Maybe you're getting some high voltage ringing which is damaging things.

author: superUnknown
author_rank: Regular Contributor
timestamp: July 30, 2013, 12:59:08 am
content: Datasheets 2403-260-00001Product Photos 2403 260 00001Standard Package 2,688Category Audio ProductsFamily SpeakersSeries -Type MagneticFrequency Range 300Hz ~ 20kHzImpedance 8 OhmSound Pressure Level 73dBPower - Rated 0.5WPower - Max 1WHeight 3.61mmSize / Dimension 15.00mm L x 11.00mm WShape Rectangular

author: c4757p
author_rank: Super Contributor
timestamp: July 30, 2013, 01:14:17 am
content: Ohm's law. 5V across 8 ohms is 5/8 = 625 mA. Average current if you're PWMing could hover around 300mA, more likely about 100mA.Absolute maximum, as in "never ever ever draw this much", per pin on most ATmegas is 40mA. Yes, you're overloading the everliving shit out of the chip.Either connect it through a 200R resistor as Psi suggested, or use a small audio output transformer as was often done in the past when driving a low-impedance speaker from a low-current, relatively high-voltage (from the speaker's point of view) circuit.Even better, use a cheap audio amplifier chip like LM386.My guess is that the "Arduino Cookbook" is intending that you use a high-impedance speaker. My suggestion is to replace it with adinnercookbook.

author: xrunner
author_rank: Super Contributor
timestamp: July 30, 2013, 01:18:36 am
content: Quote from: c4757p on July 30, 2013, 01:14:17 amYep - beat me to it. Use a transistor driver is another idea.

author: amyk
author_rank: Super Contributor
timestamp: July 30, 2013, 07:34:00 am
content: Quote from: superUnknown on July 29, 2013, 01:17:09 pmYou've fried the output driver transistors. Taking a look at somedie photosis a good idea to familiarise yourself with how very tiny they are; they're the structures next to the bond wires, which are themselves thinner than a hair. They can not source or sink much current at all.

author: superUnknown
author_rank: Regular Contributor
timestamp: August 14, 2013, 11:26:40 pm
content: Cool! Thanks all!
Altium NanoBoard 3000 reviewed in Elektor March 2010 - Page 1
Forum section: electronics / general

author: jancumps
author_rank: Unknown
timestamp: August 04, 2013, 01:11:27 pm
content: While browsing through my Elektuur / Elektor collection I found thisreview of the Altium NanoBoard 3000.It's kind of cool.

author: Stonent
author_rank: Super Contributor
timestamp: August 04, 2013, 01:29:07 pm
content: It's in some strange language with missing letters.

author: nctnico
author_rank: Super Contributor
timestamp: August 04, 2013, 02:45:25 pm
content: Its Dutch but the reason for posting a blurred text is unclear to me. But then again in Belgium the signs on the subway system show where the train is coming from, not where it is going to...

author: jancumps
author_rank: Unknown
timestamp: August 04, 2013, 04:39:32 pm
content: (That's because we know where we're going to ourselves)I don't have copyright over the material. That's why I'm reluctant to post the whole article.

author: Stonent
author_rank: Super Contributor
timestamp: August 05, 2013, 05:34:34 am
content: Quote from: nctnico on August 04, 2013, 02:45:25 pmYeah I was sort of joking about the missing text, but also the fact that the majority of us don't speak Dutch and there was no translation or synopsis.I will go out on a limb and assume we all understand English to some degree otherwise we wouldn't be here reading this but probably also wouldn't be watching Dave's videos, though I do on occasion watch those Russian chip-dip videos.

author: SeanB
author_rank: Super Contributor
timestamp: August 05, 2013, 06:13:08 pm
content: No problem with Dutch, but I do not speak it, but can understand it a lot. Then again I do have Dutch in laws. Elektor though are very touchy about putting copies of the articles online. They want you to buy them from them.

author: Stonent
author_rank: Super Contributor
timestamp: August 05, 2013, 10:48:32 pm
content: Quote from: SeanB on August 05, 2013, 06:13:08 pmI've noticed when I listen to MJLorton's videos I notice many words with a "oo" sound like "Good" have a Dutch sound to them.Is that indicative of someone who may also speak Dutch or Afrikaans or just is that just how South African English sounds?

author: SeanB
author_rank: Super Contributor
timestamp: August 06, 2013, 08:11:49 pm
content: Can be regional, can be a native speaker or can just be the speaker. You get all sorts of accents here, about the only language not common here is Russian and other Slavic languages, though there are a lot who because of past circumstances either speak or understand them.

author: Crazy Ape
author_rank: Regular Contributor
timestamp: August 15, 2013, 07:55:39 pm
content: Quote from: SeanB on August 05, 2013, 06:13:08 pmWell, let them be touchy and ignore them.We can read a review in an Aussie mag instead.http://www.siliconchip.com.au/Issue/2010/November/Review%3A+Altium+Designer+%2526+the+Nanoboard+3000
Interfacing Nokia 1200 with microcontrollers - Page 1
Forum section: electronics / general

author: pulverizers
author_rank: Newbie
timestamp: July 31, 2013, 02:00:52 pm
content: After a frantic search for info on using the nokia 1200 via f-bus, i've decided to post on the forum for help.AFAIK, nokia 1200 uses f-bus protocol ver 3 which is not well documented on the web. What should I do to interface it with MCU to send SMS,calls etc?

author: ivan747
author_rank: Super Contributor
timestamp: August 07, 2013, 02:22:17 am
content: Does it really have to be that phone? You could have it much more easy if you had a phone that could be fed standard AT commands via RS-232.

author: Psi
author_rank: Super Contributor
timestamp: August 07, 2013, 02:27:38 am
content: Some cheap gps car trackers with cell chips can be hacked easily to accept AT commands.Don't ask my for specific models though.
Noob FPGA issues? - Page 1
Forum section: electronics / general

author: sci4me
author_rank: Regular Contributor
timestamp: July 30, 2013, 05:19:30 am
content: Hi guys. So, I have been messing around with my FPGA board, slowly learning verilog, and currently, I am working on designing a "simplistic" cpu. It does work, it can read instructions and execute them, it has a fairly decent amount of instructions implemented. However, just now, I tried to change a few things and all of the sudden, whenever I compile, it just says 0 LE's. So its not compiling the processor or any of the other stuff (pll, ram, etc). All I tried to do was change a register name and size... and add a few instructions. Im wondering if there is some way I can see what the issue is or if I have to figure it out myself. The warnings dont seem to have anything to do with it, but im not sure...

author: SebG
author_rank: Regular Contributor
timestamp: July 30, 2013, 06:35:32 am
content: You need to give us a bit more like the code you changed or the warning messages when you compile. If some error occurred that is only a warning the compiler won't create the hardware.

author: jahonen
author_rank: Super Contributor
timestamp: July 30, 2013, 07:24:38 am
content: Been there, done that. That usually happens when there is some major path broken, so that no input signals actually have any effect on the output so the compiler/synthesizer just removes all "unnecessary" stuff as an optimization. See analysis & synthesis connectivity check report of compilation report if that gives any clue what is missing.Regards,Janne

author: sci4me
author_rank: Regular Contributor
timestamp: July 30, 2013, 10:05:45 am
content: Not sure what I did, but I put it into a brand new project and BOOM, the processor starts running a program.

author: flynnjs
author_rank: Contributor
timestamp: July 30, 2013, 09:31:52 pm
content: The obvious culprit is to accidentally disconnect the clock from any of the external pins.That way the synth optimiser will say "nothing is clocked and there for I can removeeverything"
New programmer to replace old one - Page 1
Forum section: electronics / general

author: Radio Tech
author_rank: Frequent Contributor
timestamp: July 30, 2013, 12:51:48 pm
content: Any recomendations on a new programmer?Or even better a way to rebuild an old one to work. Since building is fun.Many years ago I bought a Modular Circuit tech programmer. It was designed for old 286 and 386 machines with windows 3.1. Around 2 years ago the last 386 machine I had died, So the programmer now sits idle and is useless.I have looked on ebay and see the modern replacements are from 50 to 100 US bucks.In reality, this is something that will not be used that often. So it will sit for months maybe or even longer before it is used. This will be mostly targeted at the 27C128 eproms.Would really be nice to build an interface to work with modern computers. But probably stretching that a bit.

author: andersm
author_rank: Super Contributor
timestamp: July 30, 2013, 12:58:50 pm
content: Dave reviewedone of those cheapies some time ago.

author: Radio Tech
author_rank: Frequent Contributor
timestamp: July 30, 2013, 01:12:14 pm
content: Quote from: andersm on July 30, 2013, 12:58:50 pmHave to take a peek at that when I get home tonight, Youtube is blocked here at workThanks

author: digsys
author_rank: Unknown
timestamp: July 30, 2013, 01:13:27 pm
content: I have the ALL-07 and was in the same boat as you. I bought the Galep5 a few years ago. It was pricey, butthey promised pin driver development software, but year after year, no show. I ended up buying the TL866mentioned by andersm, and its actually better than the damn Galp5 in some ways. AND a shitload cheaper.

author: nctnico
author_rank: Super Contributor
timestamp: July 30, 2013, 10:20:47 pm
content: I was in the same boat a while ago. About 20 years ago I bought a Galep-3 and it served me well but last year I needed to read a device which it didn't support. I looked at the Galep5 (the Galep4 doesn't support USB) but it is way too expensive for the few times I use it. I bought a Chinese programmer through Ebay. Altough the software is a bit dodgy it does do what it is supposed to do.
FPGA OpenRISC and RS232? - Page 1
Forum section: electronics / general

author: sci4me
author_rank: Regular Contributor
timestamp: July 28, 2013, 04:21:57 am
content: Hi guys! So, I have been thinking about trying to install OpenRISC onto my FPGA fallowing this guide:http://kevinmehall.net/openrisc/guide/However, it requires me to connect via a serial cable to my pc. It says I need a serial cable. I do believe I have one somewhere around here, but I was wondering if I could somehow just directly connect it to the rs232 on my pc? I dont think I can, but I was just wondering. I am using a de0-nano fpga board. If not, I'll try and find the cable.

author: free_electron
author_rank: Super Contributor
timestamp: July 28, 2013, 05:51:56 am
content: nope. you need the levelshifters.

author: Berni
author_rank: Super Contributor
timestamp: July 28, 2013, 06:21:04 am
content: If you are in a hurry you can build one out of 2 transistors and a few resistors, but don't expect it to work at very fast baud rates. But do get a good way of getting a TTL level RS232 port as it ends up being very useful for a lot of MCU related projects.

author: sci4me
author_rank: Regular Contributor
timestamp: July 28, 2013, 07:11:09 am
content: Well, I ended up getting the cable. Things almost worked, but no luck. I got the cpu installed to the FPGA, and I got communication, but nothing more than a command that could make some led's flash. :/ That things pretty annoying to use.
Rasburry pi and Motorola Atrix laptop - Page 1
Forum section: electronics / general

author: ErikTheNorwegian
author_rank: Frequent Contributor
timestamp: July 26, 2013, 08:13:07 pm
content: I f

author: Legit-Design
author_rank: Frequent Contributor
timestamp: July 27, 2013, 12:08:07 pm
content: I was thinking of doing the same long ago when that video came out.But another good alternative is to just get older netbook. Eee PC 900 16G, when I bought mine in 2008 it was really cool, and still does keep up with lightweight lubuntu/xubuntu. Does more things with its Celeron 900Mhz, already has everything built in. When I think of everything, flash ssd (really slow one around sdcard grade), wlan card, good keyboard, webcam built in, lots of accessories available cheaply (huge aftermarket battery), spare parts available. I've seen EEE PC 900 available for around 50€ or less used. Mine has 9 inch matte display which still is ways better than some modern supermarket "home media" laptops.Ofcourse Raspberry has it's hardware decoding for video and stuff. And all these cool little interface add on boards. But if I wanted a netbook I would just get a proper netbook. For just dicking around, raspberry beats netbook ofcourse. But small things for raspberry pi really start to add up. When you're done that 35$ has atleast doubled if not tripled. In my country buying raspberry pi off the self costs around 47€ just bare 512MB model B.
FPGA's, PLL's and Counters? - Page 1
Forum section: electronics / general

author: sci4me
author_rank: Regular Contributor
timestamp: July 27, 2013, 03:13:10 am
content: Hi guys! So, I just got my second FPGA program (an 8 bit binary counter) working and now I want it to be automated so I dont have to press a button to make it count. Now, since the clock is 50 mhz, I don't really want to just use that as I won't be able to see the individual numbers. So, I added a PLL. I set it to divide by 25. I put that between my clock input and my counter, and well.. it doesnt work. All the LED's turn on... Not really sure why... Here is a picture of the block diagram:The only code I typed for this project is the counter. I have confirmed it works, so it must be the clock or the pll. The clock pin is set to R8 which is the clock input for the FPGA. I also have confirmed that the LED's work so the PLL is the only thing left. I fallowed the guide in the user manual to create it but I changed the divisor to 25 in order to get 2Hz. So... idk what else could be wrong. Any ideas?EDIT: opps, wrong pic... well, the wire goes to the PLLEDIT2: Just for fun, I made a frequency divider out of DFF's. Took 24 of them. 32 LE's

author: sci4me
author_rank: Regular Contributor
timestamp: July 27, 2013, 06:47:40 am
content: Okay, i am offically a total derp. 2 MHz not Hz -_- That explains a LOT.
Suitable chip for simple measurement / control - Page 1
Forum section: electronics / general

author: Sigmoid
author_rank: Frequent Contributor
timestamp: July 26, 2013, 04:11:02 pm
content: HeyI'm looking at building a simple regulated power supply, with an LED or LCD display for measured voltage, current, and load resistance / wattage.What would be the best microcontroller to use for doing the measurements (needs to have a reasonably good ADC), driving the display, perform control functions (drive power MOSFETs, etc.)......oh and it should be as cheap as possible. XD I could put a whole Arduino in there, but I'd feel stupid doing that.I wonder, which controller did David use in his USB power supply?

author: Christopher
author_rank: Frequent Contributor
timestamp: July 26, 2013, 05:41:22 pm
content: microchip PICs are pretty nice, use their MAPS to find a nice (8 bit?) processor with the amount of I/Os etc you need.Or just use a custom pcb with an atmega328 and shove arduino bootloader on there and shabam !

author: AndyC_772
author_rank: Super Contributor
timestamp: July 26, 2013, 05:58:30 pm
content: In terms of capability per unit cost, you could do a lot worse than one of the small STM32 ARM microcontrollers. Even if you don't need the performance, comparing roughly like-for-like in terms of I/O count and peripheral set, they're actually cheaper than 8-bit PICs.

author: Short Circuit
author_rank: Frequent Contributor
timestamp: July 27, 2013, 03:52:52 am
content: You will be makingonesimple power supply. So what does it matter how much the controller will cost (within reason of course)?I agree with Andy, go for an STM32 or any other brand Cortex-based device. Probably costs a little bit more than the low-end PIC's,but much more versatile. And much more usefull learning experience. Master the Ardwino and you're a hacker, master the Cortex and you become an embedded engineer
One of these things is not like the other - Page 1
Forum section: electronics / general

author: Stonent
author_rank: Super Contributor
timestamp: July 21, 2013, 12:40:02 am
content: http://www.ebay.com/itm/Iduino-DUE-Pro-with-USB-Serial-Adapter-completely-compatible-with-Arduino-Due-/200925146255?pt=LH_DefaultDomain_0&hash=item2ec8126c8fQuote

author: westfw
author_rank: Super Contributor
timestamp: July 21, 2013, 06:04:14 am
content: It all depends on what you mean by "completely compatible."

author: rsjsouza
author_rank: Super Contributor
timestamp: July 21, 2013, 03:26:32 pm
content: Maybe it is a game; can you spot seven differences between the pictures above?Quote from: westfw on July 21, 2013, 06:04:14 amYep. Functionally compatible, software compatible... A play on words...

author: c4757p
author_rank: Super Contributor
timestamp: July 21, 2013, 03:46:33 pm
content: Quote from: westfw on July 21, 2013, 06:04:14 amcomplete. adj., 2: to the greatest extent or degree; total.compatible. adj., 2: (of one thing) consistent with another.Thatis whatIexpect when I see "completely compatible" - if there's anything about it that would make me say "gee, I wish I had arealArduino Due", it's not compatible.

author: free_electron
author_rank: Super Contributor
timestamp: July 21, 2013, 04:46:02 pm
content: same chip , same interfaces. i dont; see problem.ok connectors are rearranged, but so what ?

author: Stonent
author_rank: Super Contributor
timestamp: July 21, 2013, 07:48:16 pm
content: Well if you want to use a Mega/Due only shield, it won't fit.

author: Phaedrus
author_rank: Frequent Contributor
timestamp: July 22, 2013, 05:54:56 pm
content: You could just use wires between the connectors. They do come in handy now and then, and they aren't primitive, or black magic. Unless your interface is extremely sensitive to impedance I don't think it would be an issue for you.
PMU for stm32F4 - Page 1
Forum section: electronics / general

author: alfred
author_rank: Newbie
timestamp: July 28, 2013, 01:35:02 am
content: Hi everybody,I have a small question maybe some of you have more experience in this matters.I have already selected the stm32F4 ARM micro for a small project, but I'm looking for a good PMU with battery charger, power reqs are normal, about 80 milliamps. The freescale i.MX line has some micros with charger/power manager included but stmicro sadly does not. Is there is any recommended chip for the stm32F4 micro?Thanks in advance,Alfredo
Compiling firmware on two different platforms - Page 1
Forum section: electronics / general

author: tarun172
author_rank: Regular Contributor
timestamp: July 03, 2013, 08:42:36 pm
content: Hello Guys,I was given an old code to work recently. The code used a generic processor along with a commercially available RTOS. The problem was the compilation was complicated (when different tools for program, and development) and gcc compiler used was version specific.This code used it's own make custom written makefile. Now, I wanted to make this simple by getting it to work on MPLAB and program it using the same IDE (easy right?Not so fast). I spent a lot of time setting the compiler and finally got it to work on MPLAB with hi-tech PICC compiler this week. The program now compiles fine and generates a hex file.When I loaded this new hex file in the processor, it did not work.. I noticed that in the hex file the code is smaller. BTW, I turned off code optimization and played around with the compiler settings. Any ideas where do I start and how do I fix this issue?- Tarun

author: nctnico
author_rank: Super Contributor
timestamp: July 03, 2013, 09:26:38 pm
content: Don't use PIC but a processor which is supported by GCC. Each C compiler has its own platform specific slang (pragmas and language extensions) so in general its not easy to move C code from one compiler to another.

author: adam1213
author_rank: Regular Contributor
timestamp: July 10, 2013, 09:16:33 am
content: Start by checking that the configuration bits are correct (e.g oscillator settings). The way that configuration settings is specified may differ between compilers. Getting it correct is crucial in making the program run.The makefile might specify defines which are used by the source code (e.g. look for "-d" being passed to the compiler or in CC_FLAGS etc). Moving the project to MPLAB may mean you need to copy the defines from the makefile to the project compilation settings.Different compilers produce different binary sizes. When you say the hex file is smaller, how small? is it so much smaller than you think it can't possibly be correct?Are you building for the PIC12F683? (based on Microcontrollers & FPGA's / Re: Using MPLAB with salvo)Have you included the RTOS in the hex file / are you using the same processor and RTOS as before or a different one?Does the compiler produces any warnings? (you may need to clean then build to get a full list)Is your aim to compile for one platform or multiple?As you asked about using MPLAB for compilation I have attempted to offer basic advise related to this. Using MPLAB's build process has limitations. However it is also simple to use once it works.

author: tarun172
author_rank: Regular Contributor
timestamp: July 12, 2013, 01:53:13 pm
content: @adam1213. Yes, iT is the same project. The configuration bits are set in the main file. I added prepossesser directives and include file paths in the compiler setting. I got a bit curious and ran a simple delay program using salvo. It did not work. The program might lie get salvo, MPLAB and HI-tech compiler.- Tarun
Timer with a dsPIC33FJ128GP804 - Page 1
Forum section: electronics / general

author: richcj10
author_rank: Unknown
timestamp: July 10, 2013, 05:14:17 am
content: I need to track time over a hour and 1/2 period to the second.It needs to be pretty accurate.I would like to use Timer1 with a external crystal.Has anyone had any experience with this?

author: adam1213
author_rank: Regular Contributor
timestamp: July 10, 2013, 09:00:27 am
content: Quote from: richcj10 on July 10, 2013, 05:14:17 amWhat accuracy do you need? e.g. over 1.5 hours would an error of less than +- 0.1 seconds be adequate?

author: richcj10
author_rank: Unknown
timestamp: July 10, 2013, 09:20:41 am
content: yes

author: adam1213
author_rank: Regular Contributor
timestamp: July 10, 2013, 09:45:34 am
content: I have experience with using the internal oscillator on PICs (not external).Essentially you just need to work out the requirements for the crystal (e.g. stability in terms of ppm)Do you have any specific questions?Semi relevant video:http://www.eevblog.com/2010/02/14/eevblog-61-crystal-oscillator-drift/

author: richcj10
author_rank: Unknown
timestamp: July 10, 2013, 01:51:07 pm
content: Well, I usually set up timers to run on the external clock for the pic with a /4. Is it more accurate to say use something like this:http://www.digikey.com/product-detail/en/CM200C-32.768KHZF-UT/300-8742-1-ND/2108134I understand the drift problem. For this application I don't think it will matter. When not in the 1.5 hour period, I don't care how much time has passed.As long as I have a tight ppm. I think it will be ok.This is what I use for my main crystal:http://www.digikey.com/product-detail/en/XRCGB25M000F0L00R0/490-5577-1-ND/2368391

author: fcb
author_rank: Super Contributor
timestamp: July 10, 2013, 03:52:05 pm
content: +/-0.5 seconds over 90 minutes is +/-93ppmYou should be good with almost any crystal - although you'll have to watch the initial frequency tolerance.I'd look at a 32.768Hz watch crystal (connected to secondary oscillator pins), they tend to be something like +/-20ppm intial tolerance and have a well defined temp coefficient. Use the recommended Microchip circuit in the notes and your done.

author: richcj10
author_rank: Unknown
timestamp: July 10, 2013, 04:07:16 pm
content: Thanks

author: richcj10
author_rank: Unknown
timestamp: July 10, 2013, 04:46:36 pm
content: When using a secondary oscillator, can you only use a external clock source instead of a crystal?I am looking at this datasheet:http://ww1.microchip.com/downloads/en/DeviceDoc/70292G.pdfPage 189What is T1CK?Quote from: fcb on July 10, 2013, 03:52:05 pmBy chance, do you know where this is?

author: Niklas
author_rank: Frequent Contributor
timestamp: July 11, 2013, 11:57:23 am
content: On page 8 in the same datasheet. Look at pins 33 and 34, SOSCI and SOSCO. You can also have a look at the more detailed reference manuals and the code examples available from the product page atMicrochip.http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en532311#1Scroll down to Documentation & Software and check sections 11, 37 and 39 and code example CE153.
chipKIT DP32 - First impressions - Page 1
Forum section: electronics / general

author: caroper
author_rank: Regular Contributor
timestamp: July 06, 2013, 03:25:20 pm
content: I have posted my first impressions of the chipKIT DP32 board in my Blog at,http://caroper.blogspot.comUnfortunately I had a busy week so did not have as much time available as I would have liked to devote to reviewing the Board, but I will be making follow up posts with more details and semi tutorials as I get time to experiment.I hope others find it helpful,Cheers,Chris
Hooking PIC18F45K20 to PC via USB - Page 1
Forum section: electronics / general

author: pulverizers
author_rank: Newbie
timestamp: July 03, 2013, 07:29:40 pm
content: Hi guys,I wonder is it really possible to hook up PIC18F45K20 with USB to my PC as it does not support USB in terms of hardware?According to:http://forum.allaboutcircuits.com/showthread.php?p=379664He said it's not difficult but I'm not sure how to get it working..especially since the library help doesn't state that it supports the 44 pin demo board with PIC18F45K20..

author: mariush
author_rank: Super Contributor
timestamp: July 03, 2013, 07:38:35 pm
content: The microcontroller itself has no USB hardware functionality.You can however use a USB to serial chip like these :http://uk.farnell.com/ftdi/ft230xs/i-f-usb2-0-fs-to-basic-uart-16ssop/dp/2081321http://uk.farnell.com/ftdi/ft232rl/ic-usb-to-uart-smd-28ssop/dp/1146032and connect this chip to the microcontroller's uart pins (or some random pins if you bit-bang bits to it).Then you can write a very basic small firmware to the pic using the programmer which gives you the option to send a full firmware through the usb and have the pic program itself.

author: pulverizers
author_rank: Newbie
timestamp: July 03, 2013, 07:45:46 pm
content: Thanks for the suggestions.However, I'm not familiar with the firmwares things especially the "pic program itself" part..

author: Skimask
author_rank: Super Contributor
timestamp: July 03, 2013, 08:01:37 pm
content: Quote from: pulverizers on July 03, 2013, 07:45:46 pmhttp://lmgtfy.com/?q=bootloader

author: mariush
author_rank: Super Contributor
timestamp: July 03, 2013, 08:02:49 pm
content: well, how would you familiarize yourself ... go read some application notes from microchip, they're freely available.http://www.microchip.com/TechDoc.aspx?type=appnotesin that filter box, type "loader" and press enter, it should give you a lot of application notes about bootloaders for various pic chips. Whatever is said about pic16 also applies to pic18 in most part.For ex seeHigh-Speed Bootloader for PIC16 and PIC18 Deviceshttp://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en546974Implementing a Bootloader for the PIC16F87Xhttp://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011788A FLASH Bootloader for PIC16 and PIC18 Deviceshttp://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en012031Implementing Bootloader Firmware Application Notehttp://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011960and others

author: pulverizers
author_rank: Newbie
timestamp: July 03, 2013, 08:07:19 pm
content: @Skimask I find it offensive.@mariush alright, thanks for your help.

author: amyk
author_rank: Super Contributor
timestamp: July 04, 2013, 10:34:09 am
content: I know there's a bitbang USB library available for AVRs, and remember seeing one for PICs but can't find it at the moment.
RN42 bluetooth module in PAN/Piconet - Page 1
Forum section: electronics / general

author: brainwash
author_rank: Frequent Contributor
timestamp: June 10, 2013, 08:55:49 pm
content: Has anyone tried setting up a piconet with one of these modules? I see some reference in the documentation that uses a PC but I want it to be done on embedded devices.https://www.sparkfun.com/datasheets/Wireless/Bluetooth/rn-bluetooth-um.pdfThe other way I can think of is to hardcode the MAC addresses or set up some device classes designating a master and several slaves and then have them reconnect periodically to transmit/receive data. I'm sure there is a smarter way to do this.

author: richcj10
author_rank: Unknown
timestamp: June 28, 2013, 01:48:08 am
content: I have used the RN-41's. If I remember correctly, The device can only connect to one "prefigured" MAC address.But, this can be reconfigured threw AT commands.The RN-42 I think can allow the BT stack be implemented on the MCU.This would give you the most flexibility.

author: brainwash
author_rank: Frequent Contributor
timestamp: June 30, 2013, 07:52:28 pm
content: Just as an update, I only had a few hours left to finish the 'project' so I went with a round-robin kind of implementation. The master module is put into command mode, it connects to the pre-configured addresses, does its communication, disconnects and jumps to the next node. The slave modules only have to wait for a connection.Since this project was just setting/reading temperatures for house heating, it did not need to have near-instant response, a delay of 1-5 minutes is perfectly acceptable and even desired. With that said, I would try to stay away from RN41/RN42 when doing multi-node communication, it's just not worth it and power consumption is pretty high.

author: richcj10
author_rank: Unknown
timestamp: July 03, 2013, 04:15:08 pm
content: Did you do this with AT commands? Like, did you reconfigure the MAC it was connecting to every time?

author: brainwash
author_rank: Frequent Contributor
timestamp: July 03, 2013, 04:46:33 pm
content: No, like I've said it's the 'normal' command mode.Code:#define SENSOR1_ADDRESS "000666412345"....sendbtcommand("$$$");...char message[] = "12345678901234567";sprintf(message, "C,%s\r\n", address);...for (char i = 0; i < CONNECT_RETRIES; i++) {putsUSART(message);delay100ms(CONNECT_DELAY);}openbtfast();delay100ms(10);...putsUSART('F,1\r\n');Command mode can only be enabled within 60 seconds after booting the BT module. You can configure this delay in command mode and make it infinite. If you're using the internal RC osc you might wish to hardcode the module to 9600bps, otherwise it might miss commands when running at 115200bps. The code above is just for proof of concept, I would not put something like this into production, but it does the job 90% of the time. Since it's running in a loop and sending the same data over and over again each 20s it does not matter if a packet is lost.

author: richcj10
author_rank: Unknown
timestamp: July 03, 2013, 05:56:50 pm
content: Nice, I like it.
Using MPLAB with salvo - Page 1
Forum section: electronics / general

author: tarun172
author_rank: Regular Contributor
timestamp: June 25, 2013, 10:49:15 pm
content: Hello,This is Tarun. I am still relatively new with MPLAB. I complied and ran few programs on MPLAB 8.88. I am using a PIC12 micro controller. Recently, I was given an old project to work with. This project uses SALVO RTOS. The code was complied in the older MPLAB. Every time I try compiling this program, I get a bunch of errors. Reading all the documents tell me that I have a compiler/linker/debugger/macros/preprocessor settings problem. Does anybody have any experience with SALVO RTOS or RTOS in general running on MPLAB?

author: adam1213
author_rank: Regular Contributor
timestamp: June 25, 2013, 11:24:14 pm
content: You may need to modify / add includes / define constants to get the information on hardware. The reason for this is that message such as :"undefined identifier "GPIO3" look like a reference to hardware which is usually provide by the includes. **it may just be a "compiler/linker/debugger/macros/preprocessor settings problem. " as you suggested.e.g. you might want to follow the advice "Warning  C:\Program Files (x86)\HI-TECH Software\PICC\9.83\include\pic12f683.h; 3.81 #warning: Header file pic12f683.h included directly. Use #include <htc.h> instead" ** though it might not make a difference. Though in general the fewer warnings the better.

author: Skimask
author_rank: Super Contributor
timestamp: June 25, 2013, 11:30:29 pm
content: And according to the SALVO pdf, the 12F683 isn't supported...

author: adam1213
author_rank: Regular Contributor
timestamp: June 26, 2013, 11:15:58 pm
content: For the messageError  ; 0. undefined symbols:....It is likely caused by:The file containing the functions has not been builtThe functions being contained in an #if condition such that they are included based on the micrcontroller. As the PIC12f683 is not officially the functions might be excluded by default

author: tarun172
author_rank: Regular Contributor
timestamp: July 01, 2013, 06:13:15 pm
content: @adam1213. I manage to get it project to compile today.I had read the entire salvo user manual to figure the last error out. After trying for a while, I found that compiler is unable to find definition of these functions located in specific files. I added salvo files specific to those functions in my source directory. The list of functions and file are given on Page 405 of salvo user manual.http://www.pumpkininc.com/content/doc/manual/SalvoUserManual-v3.2.3.pdfToday, I plan to run more tests to see if this is working. Thanks a ton for helping.- Tarun
DSPIC33FJ32MC202 PWM DUTY CYCLE PROBLEM  - Page 1
Forum section: electronics / general

author: keshab.patel
author_rank: Contributor
timestamp: June 26, 2013, 07:25:34 am
content: Hello folks. Recently I came across a problem using a dspic33fj32mc202 using independent pwm. So what happens is when I set the duty cycle pdc1 half of the ptper(period), then I should get a duty cycle of 50% but the duty cycle I get is 25%. Just like that I get 100% duty cycle when I use value in pdc1 register twice of the value of ptper register. I am using it in free running mode which implies it should operate in edge aligned mode.Please help if anyone has experience.Code:P1TCON=0b0000000000000100;P1TPER=530;PWM1CON1bits.PMOD1=1;PWM1CON1bits.PMOD2=1;PWM1CON1bits.PEN1H=1;PWM1CON1bits.PEN1L=1;PWM1CON1bits.PEN2H=1;PWM1CON1bits.PEN2L=1;PWM1CON1bits.PEN3H=0;PWM1CON1bits.PEN3L=0;P1DTCON1bits.DTAPS=1;P1DTCON1bits.DTBPS=1;P1DTCON1bits.DTA=0;P1DTCON1bits.DTB=0;P1FLTACON=0;//P1DTCON1bits.DTAPS=2;//P1DTCON1bits.DTA=63;P1DC1=530;P1DC2=1060;P1TCON=0b1000000000000100; //pwm module on//I get 50% duty in pwm1h and pwm1l. which should be 100%.I get 100% duty in pwm2h and pwm2l pin.

author: Odysseus
author_rank: Regular Contributor
timestamp: July 01, 2013, 05:04:22 am
content: I'm pretty sure this is the expected behavior of the dsPIC PWM peripheral. I can't find where it's stated explicitly, but the PWM peripheral has the nifty ability to have 1/2 Tcy resolution for the duty cycle, while the period has a resolution of 1 Tcy. This can be inferred from page 34 (section 14.13) of the Motor Control PWM documentation:http://ww1.microchip.com/downloads/en/DeviceDoc/70187E.pdfNotice that in table 14-1 and 14-2 that for a 100% Duty cycle, the listed value for PxDCy is twice that for PxTPER.The nice thing about this is that to create a 50% duty cycle, the two registers can be set to the same value.
PIC18f4431 PID loop implementation - Page 1
Forum section: electronics / general

author: dmta
author_rank: Newbie
timestamp: June 29, 2013, 02:35:24 pm
content: Hi all !!!!!I want to implement a PID motor position controller in PIC18F4431. I read the motor position using a quadrature encoder and use the built in QEI to get the motor position. The PID loop is calculated every 0.52S inside the TIMER1 overflow ISR. This is my code (all variables are global).How do I now convert this to PWM to drive the motor ?Code:void interrupt(){if(PIR1.TMR1IF==1){ // every 0.52 seconds the PID O/P is calculatedERR_P1 = ERR_P2; // get previous position errorERR_P2 = SET_P - POS; // calculate present position errorERR_AC = ERR_AC + ERR_P2; // calculate accumilated errorPID_P = (float)Kp*ERR_P2 + (float)Ki*ERR_AC*0.52 + (float)Kd*(ERR_P2-ERR_P1)/(0.52);PIR1.TMR1IF = 0;}}BTW I am using a 360 pulses per revolution quadrature encoder and operating in the X4 mode of the QEI module i.e. when the shaft rotates 1 round (360°) the motor max value of "POS" will be 360×4-1=1439

author: jahonen
author_rank: Super Contributor
timestamp: June 29, 2013, 03:18:46 pm
content: Simply write the output of your PID calculation into PWM duty cycle set register, possibly with scale/offset/limit operations.Regards,Janne
"YM3012 DIP-16PIN Cyclone II FPGA 5K PQFP-208" - Page 1
Forum section: electronics / general

author: Stonent
author_rank: Super Contributor
timestamp: July 08, 2013, 04:06:58 am
content: http://www.ebay.com/itm/1PC-YM3012-DIP-16PIN-Cyclone-II-FPGA-5K-PQFP-208-CK33-/190610585185?pt=LH_DefaultDomain_0&hash=item2c6146b661This guy has a few of these for sale.He's either extremely confused, or an idiot

author: c4757p
author_rank: Super Contributor
timestamp: July 08, 2013, 04:10:19 am
content: They've got a ton of stuff listed, I assume somebody accidentally combined two listings

author: amyk
author_rank: Super Contributor
timestamp: July 08, 2013, 05:33:50 am
content: If you Google "YM3012 Cyclone" you get a few K results, with quite a fewlike this one, so my guess is it's amistakethat one datasheet site made, then others picked it up and sellers of unknown/recycled ICs started pulling descriptions from them, propagating it even more...

author: Stonent
author_rank: Super Contributor
timestamp: July 08, 2013, 05:48:47 am
content: I reported about the first 6 to ebay for misleading title.