hybridfree/eevblog-posts huggingface dataset:
AT89LPISP STUDIO Anyone here tried this? - Page 1
Forum section: electronics / general

author: commie
author_rank: Frequent Contributor
timestamp: September 06, 2015, 04:40:34 pm
content: Hi Everyone,I was just wondering whether anybody has any experiences with Atmels AT89ISP studio software. There exists two formats of AT89LP isp programmers, the old one is driven by the PC's parallel printer port and can program virtually all 'S' variant AT89S series, however it can also program some of the low end AT89LP series aswell, like the AT89LP52, and it works no problem.If you want more device scope then you have got to use ATMEL's AT89ISPSTUDIO software which is available for download at the ATMEL website, inside this zip file is a schematic which shows a AT89LP4052 device connected to a com port(rs232) under control of Studio software.The various output/input port pins make up the ISP connector as per the original isp connections. The firmware for the AT89LP4052 is also avalable in the same zip file which is an ordinary intelhex file.So I put all this stuff together and unfortunately it doesn't work and so does anybody here have any positive past experiences with AT89ISPSTUDIO?If it helps any, the at89lp4052 does communicate with my pc turns the 'connect led' on and issues a global reset to the target device(at89lp52) but STUDIO reports device signature error:ISP bridge not enabled and aborts.See the attached pdf.

author: commie
author_rank: Frequent Contributor
timestamp: February 02, 2017, 09:24:54 pm
content: Well, its been about a year and a half since I posted the above, last week I tried again with Atmels isp studio and still the same old problem it just doesn't work.Now some will say 'buy an Atmel dongle', well yeah, we would only if one was available to buy.Given the situation, I decided to go gambling with £100.00.I ended up buying a dedicated isp/jtag programmer called PRESTO and here's the linkhttp://www.asix.net/prg_presto.htmand it works like a bomb, no regrets buying it. The original problem has been solved.CheersCommie
Compatibility between ATMega types - Page 1
Forum section: electronics / general

author: Dan Moos
author_rank: Frequent Contributor
timestamp: February 02, 2017, 04:42:14 am
content: I have a hobby project that I've been working up on a ATMega328. For mainly SRAM reasons, I'm moving the project to an ATMega1284.I'm curious if, besides features/pins that they don't have in common, will my code work unchanged? I am specifically curious if I2C library I wrote will work without needing changes.I realize that the two parts have different internal oscillators, and will make the appropriate changes.Also, the 328 uses debugWire, whereas the 1284 uses JTAG. Any capabilities that JTAG offers over debugWire that I should know about? I'm programming/debugging with an AVR Dragon.Thanks!Sent from my E6830 using Tapatalk

author: Kleinstein
author_rank: Super Contributor
timestamp: February 02, 2017, 04:40:36 pm
content: The newer ATMega are very similar. So the mega328 code should also run on the mega1284. It is only the older ones, like mega8, Mega16 that were a little different, though much of this is only a different name convention - so even there things were rather similar, just got different names.AFAIK JTAG has a few extra functions and thus should be a little more powerful than debug wire. Also the JTAG pins are usually active for JTAG. So if you need the JTAG pins as a normal IO, you have to disable JTAG first.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: February 02, 2017, 04:56:45 pm
content: Yes, big chance it works after a recompile (with the new target).The register definitions are usually named the same in the header files across a wide range of ATmega devices.The 1284 is nice, did a project with that too. If you're still short for IO try the 128 instead, it pretty big (and cheap on ebay - last time I looked) but in QFP package, not a DIP.

author: krho
author_rank: Regular Contributor
timestamp: February 02, 2017, 06:17:09 pm
content: Can't cay for atmega, but whole XMEGA A-E series is compatible. Unless you go down the family chain towards E series and use something that that doesn't have.however going from atmega to xmega requires some work, as peripheral structures are differently named also the flags. Bot To mee they seem more sane than the ones in atmega.

author: Rick Law
author_rank: Super Contributor
timestamp: February 02, 2017, 08:25:29 pm
content: This is the ATTINY line, but ATMEGA line may also have the same. Some of the bit settings for various register may be different between chips within the same product line.I recall I had a hard time doing either a adc timer or PWM (not recall clearly which, one of them.) Between the Attiny 13, 25, and 85, they all have the same bits controlling the same feature but they are at different positions in the byte. After verifying the bits are there between them, I didn't catch that one control bit was at a different position during the initial coding. I had a hard time debugging that later.
LPC1768 usbDeviceError - Page 1
Forum section: electronics / general

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: February 01, 2017, 02:43:11 pm
content: HiI have made a simple program for my LPC1768 using keil V5.22 the LPC should act like a USB host to a mice that I have attached to it. the problem is that I will always got the usbDeviceError from the USBH_HID_GetDeviceStatus function.Here is my USB thread codeCode:void USB_Thread (void const *arg){static usbStatus myst;static usbHID_MouseState mymouse;myst=USBH_Initialize (0); /* Initialize USB Host 0 */while (1){osDelay(10);myst=USBH_HID_GetDeviceStatus(0);}}and this is my main functionCode:osThreadDef(USB_Thread, osPriorityNormal, 1, 2048);osThreadId tsk_USB;int main (void) {osKernelInitialize (); // initialize CMSIS-RTOSosKernelStart (); // start thread executiontsk_USB = osThreadCreate(osThread(USB_Thread), NULL); //it's used for USB mousewhile(1){}}Here are some pictures of my RTX and USB configuration boxesDo you have any Idea?

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: February 02, 2017, 04:36:22 pm
content: Any Ideas?
PIC24 open drain  I/O configuration for level down-shifting? - Page 1
Forum section: electronics / general

author: smoothVTer
author_rank: Regular Contributor
timestamp: February 01, 2017, 03:47:40 pm
content: We know that PICs and many MCU's offer some configurable I/O's to be set to push-pull or open drain. In particular in PIC24 datasheets there is a mention of using the open-drain I/O setting for shifting levels up to ahighervoltage.What about using open-drain outputs for interfacing to alower voltage? What are the gotcha's and traps for young players to watch out for?In my example target application I have to use the PIC24's UART to output 1.8V CMOS levels for interface to another device on the PCB. Data rate is 1e6 baud. I am able to successfully configure the PIC for open-drain IO and I use pull ups to the local 1.8V rail ( I am well decoupled ), and the system seems to work with the lower voltage. HOWEVER: Although the signal fall time is sharp at <15ns, the rise time to logic high 1.8V is terrible ... 175ns with880 ohmpullups. Originally I tried 4.7k pullups ( coming from an I2C frame of mind ) but that distorted the signal beyond the point of recognition.Back of the envelope calculations for this rise time indicate something like a ~68pF capacitance on the open-drain pin; this include probe tip capacitance. Still I cannot account for the disparity between rise and fall times of my signal.Anyone have any experience with the rise time of open-drain IO's and could suggest possible remedies?

author: JPortici
author_rank: Super Contributor
timestamp: February 01, 2017, 04:20:18 pm
content: Quotei think it's to be expectedopen drain: as in I2C you are merely putting a logic 0 or 1 on a NFET. this means that there is a device actively sinking current, but not one sourcing current, so the low to high transition (charging time) will depend on pullup and capacitanceif you need a push-pull output to keep fast transition times there are level shifters ICsfrom my go-to dspic datasheet, electrical characteristicParameter DO56CIO Max for All I/O Pins and OSC2 (when in EC mode): 50 pF which is consistent with your measurement

author: David Hess
author_rank: Super Contributor
timestamp: February 01, 2017, 04:33:40 pm
content: Open drain outputs work fine for level shifting to a lower voltage. Your rise time is consistent with the time constant of 68pF and 880 Ohms; it is common for open drain outputs to have slow rise times unless special measures are taken which explains why dedicated level shifters are used when high speed at low power is required.68pF seems high though if you are using a x10 oscilloscope probe. I would make the rise time measurement and then add enough shunt capacitance to double it. Then the shunt capacitance will be equal to the circuit and probe tip capacitance and you will have an independent measurement of capacitance.Update:The high output capacitance from the datasheet identified by JPortici explains everything.So what is it you want to accomplish? Replacing the pull-up resistor with a current source will significantly lower the rise time if that is truly necessary.
MACHXO2 - Slow Slew Rate... Not so slow. - Page 1
Forum section: electronics / general

author: Ice-Tea
author_rank: Super Contributor
timestamp: February 01, 2017, 03:06:02 pm
content: So, routing a board with a nice Lattice CPLD. While checking the schematics, I figured there'd be no need to put series resistors. The device has programmable slew rate control on all pins, no worries mateNot quite. That is: the slew rate controlisthere but what it roughly turns worst-case ramp from 125ps into 250ps. So that gives me a whopping 10mm or so before thing turn to s**t. Which is a long way removed from my initial assesment of "don't worry running this signal to the other side of the board, you can squash the signal at will".This is not "slew rate control". It's "marginal improvement of slew rate".Useless.So, question. What are your experiences with other 'slew rate controlled' devices? Equally useless?
Microchip MDDFS & dsPic33F - Page 1
Forum section: electronics / general

author: @rt
author_rank: Super Contributor
timestamp: February 04, 2017, 03:09:17 am
content: HiAnyone have them working together?I’ve been using an older version that was a sample for dsPic33FJ, but it’s a version prior to SDHC support.Last night I upgraded from C30 which is years outdated, to XC16, the latest MPLAB, and latest MDDFS. Surprise! It still doesn’t workBonus surprise, my C30 project runs fine, and only a minimal change was required to use -o1 optimisation with it.Those two things are the opposite of what I expected. It means the old MDDFS is still compiling fine with XC16.I was hoping someone might have made a self contained MDDFS project they might share, just to get the SDHC cards working.Cheers, Brek.

author: @rt
author_rank: Super Contributor
timestamp: February 04, 2017, 06:45:02 am
content: If only Microchip could do this:https://drive.google.com/drive/folders/0BzFKG7_PKHJ9fkQ1aHBaeHlYZjlsck04Q09KTlFJUFRtenp4QU5uM09zZVFNbkEzQ1g2NUU

author: @rt
author_rank: Super Contributor
timestamp: February 05, 2017, 05:26:12 pm
content: I squashed in Microchip’s image decoder library into my mp3 player as well,to have a go at Coverflow... or Covershow.. or even Coverslow.They are mostly Jpegs in mp3 ID3 tags, and if the track was exported from iTunes, it’s guaranteed.Sadly there was no 128x64 mono LCD driver in the image decoder demo.and greyscale by cycling bitplanes....
SKU:DFR0090 SPI LED module test in assembler + SPI decoding on Rigol DS1054Z - Page 1
Forum section: electronics / general

author: Roeland_R
author_rank: Regular Contributor
timestamp: January 30, 2017, 08:44:25 pm
content: I want to share my little program driving a SKU:DFR0090 SPI LED module. The program runs in an Arduino UNO and is very small:Segment Begin End Code Data Used Size Use%---------------------------------------------------------------[.cseg] 0x000000 0x000284 504 40 544 32768 1.7%[.dseg] 0x000100 0x000100 0 0 0 2048 0.0%[.eseg] 0x000000 0x000000 0 0 0 1024 0.0%as you can see in this report from Atmel Studio 7. I'll try to make it smaller than it is already, and reduce the number of used registers......for a little demo:https://youtu.be/WhXzjs4MsoUI added 2 screenprints of perfectly working SPI decoding on my Rigol DS1054Z
ATX PSU shield for - Page 1
Forum section: electronics / general

author: Chai
author_rank: Regular Contributor
timestamp: January 28, 2017, 12:51:32 am
content: .

author: Monkeh
author_rank: Super Contributor
timestamp: January 28, 2017, 12:57:17 am
content: Why do you even have islands? It's not a plane if you split it up, and you're liable to make matters worse by doing so.

author: Chai
author_rank: Regular Contributor
timestamp: January 28, 2017, 01:00:38 am
content: Quote from: Monkeh on January 28, 2017, 12:57:17 amOh.. I should add that I have zero pcb design experience aside from what I am learning in the video course. Goal is just to get something made that will work OK....the analog section has a thermocouple adc input circuit, dac for constant current circuit, crystal. Islands to prevent noise from LED IC, relay, higher power adj. pwr section
Adding Wifi to PIC24F - Page 1
Forum section: electronics / general

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 25, 2017, 08:53:20 am
content: I have been playing with PIC24FJ128GA204 and in particular I really like its DMA capabilities...I would like to add either WiFi or ENC connectivity and have been looking at MRF24WN0MB and EBC624J600..For my very simple application I would like to be able to serve a configuration page (maybe a couple of pages) via HTTP and be able to send and receive UDP packets occasionally for control.Ideally I would go wireless as my timing requirements are low and it saves wires (although it makes initial configuration harder)But... the MRF24WN0MB is very $$$Are there any sensible alternatives?Thanks in advance

author: ataradov
author_rank: Super Contributor
timestamp: January 25, 2017, 09:03:05 am
content: ESP8266?

author: krho
author_rank: Regular Contributor
timestamp: January 25, 2017, 05:24:32 pm
content: Or ESP32 and in time you'll also get BT support

author: NivagSwerdna
author_rank: Super Contributor
timestamp: January 26, 2017, 12:00:21 am
content: I have decided to bite the bullet and try out MRF24WN0MB properly... its expensive but Wifi seems to be expensive.

author: ataradov
author_rank: Super Contributor
timestamp: January 26, 2017, 12:03:24 am
content: Quote from: NivagSwerdna on January 26, 2017, 12:00:21 amNot really. With ESP8266 or ESP32 Wi-Fi is pretty cheap

author: macboy
author_rank: Super Contributor
timestamp: January 27, 2017, 06:19:46 pm
content: Quote from: ataradov on January 26, 2017, 12:03:24 amAnd you can let its firmware handle all Wifi details and TCP/IP stack, presenting your TCP connection as a two-way byte stream over UART. So simple.
EE-TOOLS EeRom-8U, 8-bit EPROM/Flash emulator up to 8M-45ns USB port: protocol ? - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: January 02, 2015, 09:21:35 pm
content: hii am still looking for a good eprom emulator, something thatis faster than 1Mbpsis able to handle 3.3V/5Vis USB drivenEE-TOOLS EeRom-8U, 8-bit EPROM/Flash emulator up to 8M-45ns USB port, isexactlywhat i am looking for !it is 10Mbps, it is 3.3V/5V and it is USB driven !the only defect: the protocol is not documented, it is not open, you can only use this device on Windows !for my purpose i need to connect the eprom emulator to a linux MIPS/SoC, so i need sources, perhaps, i need to know the protocol in order to drive the usb-deviceanybody knows this eprom emulator ? anybody knows something about its protocol ? any hack around ?

author: legacy
author_rank: Super Contributor
timestamp: January 02, 2015, 09:22:24 pm
content: If your browser can hit it,hereit is an auction on ebay.

author: legacy
author_rank: Super Contributor
timestamp: January 02, 2015, 09:42:44 pm
content: here, the LEAP ELECTRONIC WICE-M4 EMULATOR, 4MB ROM, USB INTERFACE is an other good usb eprom emulator, i am not able to understand how fast is it about the upload, also … it seems closed protocol, too

author: legacy
author_rank: Super Contributor
timestamp: January 04, 2015, 06:33:58 pm
content: which software can i use to reverse the protocol over the usb bus ?about eprom-emulator, i have foundthisfunny project

author: abyrvalg
author_rank: Frequent Contributor
timestamp: January 04, 2015, 11:30:59 pm
content: http://freeusbanalyzer.com/worked fine.

author: AlexxGreen
author_rank: Newbie
timestamp: January 24, 2017, 02:13:14 pm
content: Did you try an app like USB port Sniffer (http://www.eltima.com/products/usb-sniffer/)?

author: obiwanjacobi
author_rank: Super Contributor
timestamp: January 24, 2017, 02:35:46 pm
content: https://wiki.wireshark.org/USB

author: ale500
author_rank: Frequent Contributor
timestamp: January 25, 2017, 05:48:25 am
content: You need to reverse engineer the protocol, test and develop new software...I just wonder, because you seem to dive quite deep into electronics, if it may be an alternative to develop your own:Big SRAM with bus isolators and a STM32F4 to program it, it has HS interface. or using one of those FT2322 or similar, they go up to 12 Mbps or similar.I also need something like this, but for only 8 to like 32 kBytes and 16 bit

author: legacy
author_rank: Super Contributor
timestamp: January 25, 2017, 10:36:41 am
content: dude, 2 years later? Already solved 1 year ago

author: eliocor
author_rank: Unknown
timestamp: January 25, 2017, 09:21:00 pm
content: Just for curiosity: what was your end choice?
Electrical conductivity sensor - Page 1
Forum section: electronics / general

author: dizgah
author_rank: Regular Contributor
timestamp: January 28, 2017, 06:56:18 pm
content: I'm searching for a mature EC sensors for using in a hydroponics greenhouse,But unfortunately all devices I found are unreasonably expensive or proprietary worked on their own solution.Does any one have any suggestion?WBR.

author: Ian.M
author_rank: Super Contributor
timestamp: January 28, 2017, 07:37:24 pm
content: Define "unreasonably expensive". Calibrated sensors suitable for chemical process equipment are always $expen$ive$.I assume you've seen this $70 one with a MCU ADC compatible output?https://www.amazon.com/Ec-pH-Transmitters-Arduino-Sensor/dp/B01FL10P6QOtherwise DIY would be possible e.g Tantalum foil electrodes cast into an Epoxy body, or an inductive sensor with two toroidial core coils potted between a short inner and outer plastic pipe.N.B. inductive conductivity sensors need the solution under test to form a closed loop circuit through both toroids - you cant simply wrap the coils round a pipe.
SAM E70 Xplained - Page 1
Forum section: electronics / general

author: ehughes
author_rank: Frequent Contributor
timestamp: January 25, 2017, 01:14:20 pm
content: Just a warning for anyone who may be thinking about the SAM E70 Xplained board (ARM Cortex M7). I had purchased a couple for some power studies. The EDBG firmware loaded ( 3.1f) is buggy. You cannot start a debug session out of the box. There is a workaround but it is quite annoying when you are getting started with the platform. Atmel support has an internal version of firmware that fixes the problem but you have to contact them to get it.

author: ataradov
author_rank: Super Contributor
timestamp: January 25, 2017, 05:34:33 pm
content: Quote from: ehughes on January 25, 2017, 01:14:20 pmWhat exactly a bug is? I don't have any problems with them, but there many combinations of various tools that come into play.

author: ehughes
author_rank: Frequent Contributor
timestamp: January 25, 2017, 09:00:40 pm
content: You cannot download and start a debug session. You have to 1st download the flash, reset the CPU with the reset button and then attach to the target. To stop at main, you have to put a dummy while() loop that you unlock when you attach the debugger.Atmel support claimed this is in the 3.1f firmware on the E70 board with the current version of Studio 7. I have 2 boards and they do exact the same thing. It is quite annoying.I have yet to try a real debugger such as a J-Link but that is next on my list when I get some time.

author: ataradov
author_rank: Super Contributor
timestamp: January 25, 2017, 09:16:49 pm
content: With Atmel Studio 7 (Version: 7.0.1006) and EDBG Firmware Version 3.19, I don't see any problems. This is the latest version of firmware supplied eith for that version of AS, and I don't want to upgrade, but it looks like a new error. So downgrading your version may help.
Code Review Tools - Page 1
Forum section: electronics / general

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: January 19, 2017, 09:56:44 pm
content: Can anyone recommend a good tool for conducting code reviews? We need something that makes it easy to generate diffs and distribute them to a small group of reviewers to solicit their comments and track them to closure. Something that interfaces easily with Subversion (or Git) would be ideal. Even better if it interfaces to Polarion.We've tried Phabricator, but it's too large and unwieldy for the kinds of code reviews that we do.

author: Fred27
author_rank: Unknown
timestamp: January 19, 2017, 10:38:41 pm
content: Pull requests tend to work well for this. How are you hosting your git repo? I use Microsoft TFS to host the git repo and that works nicely with diffs, comments, merging, etc.

author: sd
author_rank: Unknown
timestamp: January 19, 2017, 10:40:35 pm
content: Have you tried gerrit ?

author: mngiggle
author_rank: Contributor
timestamp: January 19, 2017, 10:46:47 pm
content: Our software lead and us electrical guys have evaluated and are just getting going using Collaborator:https://smartbear.com/product/collaborator/overview/. Seems like a good tool, but it's too early to tell how good.

author: newbrain
author_rank: Super Contributor
timestamp: January 20, 2017, 06:59:54 am
content: At work, we use gerrit, whch is well integrated with git and the CI tools.Though I personally don't write code, I'm often involved in the reviews: the process does work and I did not hear any major complaint from the development teams.One can give a -2 to +2 vote on a patchset (or a restricted range, depending on the role), and edit the code in place to propose changes.You can of course subscribe for changes to a repo, or use an RSS feed.The size of our projects is in the order of 100kLOC each.

author: MarkF
author_rank: Super Contributor
timestamp: January 20, 2017, 07:44:35 am
content: I use WinMerge for Windows.http://winmerge.org/about/

author: rollatorwieltje
author_rank: Unknown
timestamp: January 20, 2017, 09:18:42 am
content: We use ReviewBoard with SVN. I didn't install it myself, but apparently it wasn't that hard. Someone did make a tool (can't share it unfortunately) to post proper diffs, the built-in functionality for creating a review is a bit crude.

author: kcbanner
author_rank: Contributor
timestamp: January 21, 2017, 02:50:30 am
content: The Github pull request interface is quite good. We've used it for years where I work.

author: mac.6
author_rank: Regular Contributor
timestamp: January 21, 2017, 06:48:09 pm
content: Quote from: Sal Ammoniac on January 19, 2017, 09:56:44 pmDefinitely gerrit if you are using git, for subversion I have no experience.

author: IanB
author_rank: Super Contributor
timestamp: January 21, 2017, 07:10:06 pm
content: Another suggestion for SmartBear Collaborator here.It is simple and easy to use, and interfaces with many tools including Git and Subversion.
MCU voltage mesurement - Page 1
Forum section: electronics / general

author: dan3460
author_rank: Frequent Contributor
timestamp: January 31, 2017, 11:41:12 pm
content: I'm in the final stages of development of a benchtop instrument, the last thing is to measure the voltage (0 to 125AC) and pass that to the MCU to calculate power. I was trying to make this a simple as possible so I was using a small transformer, the basic diagram can be seen below. I was sampling the voltage at the junction of R1 and R2. I have a calibration procedure on the instrument and as I was using it I notice that from about 20VAC and up the measurement was very accurate, but it sucked under that voltage. I couple of hours chasing a rabbit on the programing hole, I came out empty. Contemplating the prototype board suddenly I realized what was the problem, the diode drop is about 18VAC. Meaning I get 0V reading until the voltage is about 18VAC.The solution that I'm thinking now is get the output from the transformer shove it into a comparator that will produce a sine wave between 0 and 5V and calculate the RMS from there, I think I saw something similar somewhere in the net.Any other ideas? I know that there are chips that can read voltages but I'm trying to get the cost as low as possible on this thing.Thanks for the help,

author: mrm2007
author_rank: Contributor
timestamp: February 01, 2017, 08:11:57 am
content: Hi,You could use Precision Rectifiers using a circuit with an Opamp and simple diodes. They are very useful for measurements.check this Document :http://www.site.uottawa.ca/~rhabash/ELG4135L8.pdf(circuits on Page 5 & 6 should be good enough)You only need to make sure that the input voltage is in the opamp input range.BTW, I think you forgot to attach the circuit.

author: Ian.M
author_rank: Super Contributor
timestamp: February 01, 2017, 08:30:43 am
content: We can't see your 'basic diagram' so cant see what you've done wrong. Also you haven't specified the accuracy required nor the resolution of the MCU's ADC.

author: dan3460
author_rank: Frequent Contributor
timestamp: February 01, 2017, 12:32:33 pm
content: I'm sorry you are correct I forgot to attach the circuit, I will do it when I'm back home.The PDF mentioned looks very interesting.Thanks

author: dan3460
author_rank: Frequent Contributor
timestamp: February 01, 2017, 01:49:19 pm
content: It is so much to learn, I which I have been able to get into electronics in my youth. A full wave precision rectifier is exactly what I was looking for.Thank you guys.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: February 01, 2017, 06:27:46 pm
content: Quote from: dan3460 on January 31, 2017, 11:41:12 pmAnd accuracy too by the sound of it.QuoteUnless the AC waveform is close to a pure sine wave and the load purely resistive your power measurement will probably have poor accuracy. But hey, at least it's cheap!
FPGAs and FIR filters - Page 1
Forum section: electronics / general

author: Boscoe
author_rank: Frequent Contributor
timestamp: January 19, 2017, 09:20:35 pm
content: I wrote some code for a 24bit wide FIR filter with 1024 taps for audio. Thing is, one filter is 20 times larger than a 22k LE Altera FPGA. Just as a bit of a sanity check does this sound right or must something be wrong for this to happen?

author: suicidaleggroll
author_rank: Super Contributor
timestamp: January 19, 2017, 09:39:35 pm
content: 1024 taps is a -LOT-...are you sure you need that many? Does the Altera have built-in IP for FIRs? I know Xilinx does, and you can trade off area for speed by feeding it a clock that's faster than the input data rate. A couple of months ago I used it to implement a 144 tap LPF on an Artix-7. 625 kHz sample rate, 32-bit, dual channel, 40 MHz clock, and it takes up 14 of the 120 DSP slices on a 50k LE Artix-7 (negligible amount of other resources).

author: Boscoe
author_rank: Frequent Contributor
timestamp: January 19, 2017, 10:07:30 pm
content: Quote from: suicidaleggroll on January 19, 2017, 09:39:35 pmThanks! I would like to gather some insight into whats possible. 1024 is a a lot - I want sharp filters. I tried 256 tap and a bit of optimsing in my code but still at 100k as would be expected!Altera only has basic FIR IP built in but will look for others on their site. My FIR doesn't have a higher clock than the sample clock which does seem a bit of a waste as my sample rate is only 48kHz. I don't know of a FIR architecture that could make use of a fast clock without using a load of multiplexers to reduce multipliers and adders.

author: Someone
author_rank: Super Contributor
timestamp: January 20, 2017, 12:50:01 am
content: Quote from: Boscoe on January 19, 2017, 10:07:30 pmThe usual approach when you want to trade off area with throughput is to put the data into a buffer, the rams should take care of all the large multiplexing. One extreme end is fully combinatorial with 1 sample per clock throughput, and the other extreme end is the fully sequenced design which is blocking and takes n clocks to compute the result where n is the number of taps in the filter.

author: langwadt
author_rank: Super Contributor
timestamp: January 20, 2017, 01:24:58 am
content: Quote from: Boscoe on January 19, 2017, 10:07:30 pm48kHz time 1024 taps is less than 50MHz. Two RAMs, one for data one for coefficients and a single multiplier accumulator and counter to do addressing should do it

author: Boscoe
author_rank: Frequent Contributor
timestamp: January 20, 2017, 09:17:45 am
content: Quote from: langwadt on January 20, 2017, 01:24:58 amAhh yes this does make sense, thanks. Throws up some interesting challenges like writing and reading the input data in time. I like a challenge and I think this will be my route.
Broadcom development tools - Page 1
Forum section: electronics / general

author: Jane
author_rank: Frequent Contributor
timestamp: January 18, 2017, 08:40:45 pm
content: Does anyone have any experience with Broadband studio by Broadcom? Does anyone know where any documentation about Broadband studio can be found?Thanks.

author: amyk
author_rank: Super Contributor
timestamp: January 19, 2017, 12:17:48 pm
content: Given that info on Broadcomanythingis as rare as hen's teeth on the public Internet, I doubt you're going to find much here. I'd suggest looking for other sites which mention it.

author: jnz
author_rank: Frequent Contributor
timestamp: January 19, 2017, 05:47:12 pm
content: Quote from: amyk on January 19, 2017, 12:17:48 pmThey do love their NDAs. It's clear they have about zero interest in the under 50k units at a time crowd.
ESD causing Teensy-LC to crash - Page 1
Forum section: electronics / general

author: Andrew_K
author_rank: Contributor
timestamp: January 19, 2017, 03:05:45 pm
content: Hey all,A friend of mine is making a game with a single button hooked up to a Teensy to tell a computer when the button is pressed.https://lh3.googleusercontent.com/-_pWgE90n4xM/WH-Dz7bOKOI/AAAAAAAAAAg/QYPMyXGTbOcWeeUVVwihLLbdH4AR698BACL0B/h2048/2017-01-18.jpgis a picture of the setup. Very simple circuit, the input checks to see if the switch is high or ground. The source code is literally just checking to see if pin 10 is high or low, and if the button is pressed, it sends a character to a computer via USB. Here is a rough schematic:Now, the problem he's having is that static discharge on the enclosure, from walking on the carpet, is causing the device to reset. To me it seems like the Teensy is going in to programming mode rather than just resetting. It does the same exact thing when I push the programming button, where only a power cycle will start the program again.Last night I was doing some ESD testing using a piezo sparking mechanism. The issue seemed to happen when the enclosure was both grounded and not grounded with the Teensy. I noticed that the program pin on the watchdog uC was floating, so I tried tying that high, but the same issue was still happening. It really seems as if it's going in to programming mode. Also, sometimes the Teensy has to be flashed with the program again.Any ideas?
[BitCloud] Interrupt handler seems not working - Page 1
Forum section: electronics / general

author: danergo
author_rank: Regular Contributor
timestamp: January 16, 2017, 09:34:47 pm
content: Hi,I've a custom board with ATMEGA256RFR2 on which I'm using 3 simple buttons with pullup resistors. All are connected to the straightforward interrupt pins on INT4,5,6.I'm trying to use them, but my ISR's are not getting called through BitCloud. (Normally, with manual ISR functions they work fine):Code:volatile uint8_t test = 0;void Button1InterruptHandler() {if (0 == test) {test=1;PORTB ^= (1<<PB3); //This should flip PB3 only once. But it remains VDD.}}uint8_t setupISR() {DDRB |= (1<<PB3);PORTB |= (1<<PB3); //Test pin, set it to VDDif (0 != HAL_RegisterIrq(INT4, IRQ_LOW_LEVEL, Button1InterruptHandler))return BC_FAIL;}...setupISR();...Do I miss something? I wouldn't like to deepdive into HAL functions if the code above contains some simple bug.Thanks!

author: ataradov
author_rank: Super Contributor
timestamp: January 16, 2017, 09:46:46 pm
content: If IRQ pin remains low, it will trigger a repeated interrupt. You need to disable interrupts in the handler and then poll until level goes back up. Look at how BSP code for buttons works.Did not notice your test flag protection.The code for interrupts is essentially equivalent to manual setup, so they typically works as expected, so I really don't know what is going on.EDIT: did you actually configure the INT4 pin to be an input?And you also need to enable IRQ after you register the handler:Code:HAL_EnableIrq(IRQ_4);And it should be called IRQ_4, not INT4.

author: danergo
author_rank: Regular Contributor
timestamp: January 17, 2017, 06:45:33 am
content: Quote from: ataradov on January 16, 2017, 09:46:46 pmThat's the one I missed! Thanks!Quote from: ataradov on January 16, 2017, 09:46:46 pmYes, INT4 is configured, but the sample code was not complete - sorry.Quote from: ataradov on January 16, 2017, 09:46:46 pmBoth INT4 and IRQ_4 equals 4 actually.
Bascom Error Help - Page 1
Forum section: electronics / general

author: Fisher77
author_rank: Regular Contributor
timestamp: January 15, 2017, 08:24:43 am
content: I was in the process of trying to learn how to use Bascom. I was following an online tutorial, but didn't get very far. I opened a new project, and changed the chip to a m8def.dat. Then I set it to run the simulator after compilation. When I clicked ok this error (on the screenshot below) popped up. I have uninstalled/reinstalled the program twice, but still get the same error. Anyone know how I can fix this problem?Thanks

author: andersm
author_rank: Super Contributor
timestamp: January 15, 2017, 09:02:50 am
content: For security reasons, newer versions of Windows (I believe Vista or newer) do not allow programs to write to the Program Files folders. Try saving the file somewhere under your user folder instead. If the program is so old and crappy that it doesn't allow that, then install it to some other location that isn't OS-protected.

author: RoGeorge
author_rank: Super Contributor
timestamp: January 15, 2017, 10:17:13 am
content: When you launch the BASCOM, run it as Administrator.

author: Fisher77
author_rank: Regular Contributor
timestamp: January 15, 2017, 09:33:48 pm
content: Quote from: RoGeorge on January 15, 2017, 10:17:13 amI ran as an administrator and that did the trick.Quote from: andersm on January 15, 2017, 09:02:50 amI am running windows 10. I tried to move the folder to a user folder, no go. I uninstalled Bascom, and reinstalled it in a user folder, and the problem is now solved.I should have known it would not write to that Program File without running as an administrator, brain fartI really appreciate the both of you for helping me out with this

author: Fisher77
author_rank: Regular Contributor
timestamp: January 17, 2017, 12:29:21 am
content: Well I have another problem now. I have watched this video and followed the instructions on how to load the blink into a Arduino Uno from Bascom. I cannot get it to work. It will not upload. Just sits there. I did change the com to the right port. When I compiled, it found no errors. When I hit F4 to upload it switched screens, and did nothing. Shows ? ? ? in the Chip box. When I click to identify the chip it says detected micro does not match the selected micro ATmega328P.First pic shows the code I entered, and the micro selection.Second pic shows after I compiled, no errors found.Third pic shows after I hit F4 to uploadFourth pic shows after I click to identify the chipCan anybody tell me what I am doing wron, or what might be going on here?Thanks

author: RoGeorge
author_rank: Super Contributor
timestamp: January 19, 2017, 05:05:18 pm
content: In BASCOM-AVR, go to 'Options' -> 'Programmer'. The selected programmer must be ARDUINO, and the baud rate should be 115200. Some older Arduino boards might use baud rate 57600 instead of 115200.In the attached picture, my COM-port is COM3 but your COM port number most probably will be different. You must select the port number that your Windows assigned to your Arduino board when you plugged the board into the USB port.
looking for a method to test the ram on a linux sbc - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: January 15, 2017, 04:11:24 pm
content: so, I happen to have realized a made in home linux SBC, and I'd like to test if the ram is OK since I have manually soldered it on the PCB.do you know, guys, a method to check how good it is?I could implement a few lines of C (1), but before reinventing the wheel I know I'd better ask, so here I am(1) e.g. with a big malloc, and then doing pattern-check (address in address) inside the slicemay be a good idea?

author: amyk
author_rank: Super Contributor
timestamp: January 15, 2017, 04:20:38 pm
content: You may get some ideas fromhttp://www.memtest.org/

author: nctnico
author_rank: Super Contributor
timestamp: January 15, 2017, 05:46:09 pm
content: There is a program for Linux called 'memtester'.

author: legacy
author_rank: Super Contributor
timestamp: January 15, 2017, 08:03:01 pm
content: Code:* sys-apps/memtesterHomepage: http://pyropus.ca/software/memtester/Description: userspace utility for testing the memory subsystem for faultsLicense: GPL-2thanks

author: edpalmer42
author_rank: Super Contributor
timestamp: January 15, 2017, 08:14:00 pm
content: If you can boot your system from a live CD/DVD (or probably USB) of most distros, they have memtest as a boot menu option.

author: legacy
author_rank: Super Contributor
timestamp: January 15, 2017, 09:28:00 pm
content: Quote from: edpalmer42 on January 15, 2017, 08:14:00 pmit's neither x86 nor arm, there is no CD/DVD for itBut, I can use the kernel + the rootfs to test the ram.
Code works on AT89S52 but not on AT89C2051 - Page 1
Forum section: electronics / general

author: TheInfernoMan
author_rank: Contributor
timestamp: January 15, 2017, 02:08:12 pm
content: Hello,I have a problem running my code (for a school project) on my little PCB with a AT89C2051.I tested the code on a AT89S52 and on the AT89S52 it works like a charm (on P3, because of ISP)But when I try the code on my AT89C2051 (yes I changed the target (for the addresses)) it dont work.It goes to "start" but after that, the code did not run :/Did someone have an idea why it is so? I think about some incompatibility...Is there a way to optimize the code (it is attached with german commentary) ?Thanks in advance

author: jesuscf
author_rank: Frequent Contributor
timestamp: January 15, 2017, 05:11:48 pm
content: I think you'll need to change:fehlgeschlagen:MOV R6, 8dMOV P1, 0ffhto:fehlgeschlagen:MOV R6, #8d ; missing '#'?MOV P1, #0ffh ; missing '#'?

author: TheInfernoMan
author_rank: Contributor
timestamp: January 15, 2017, 05:15:03 pm
content: Oh you are right:O I try it

author: TheInfernoMan
author_rank: Contributor
timestamp: January 15, 2017, 05:23:11 pm
content: No sorry, it is still not working

author: jesuscf
author_rank: Frequent Contributor
timestamp: January 15, 2017, 05:49:01 pm
content: Quote from: TheInfernoMan on January 15, 2017, 05:23:11 pmCheck that you have 'MOV R6, #8d' not 'MOV R6, #8dh' (I incorrectly made the constant hexadecimal 0x8d when it should had been decimal 8 in my original reply, but it is changed now).

author: TheInfernoMan
author_rank: Contributor
timestamp: January 15, 2017, 06:06:40 pm
content: No in my code, it is correct. But still thanks for this idea

author: jesuscf
author_rank: Frequent Contributor
timestamp: January 15, 2017, 09:08:13 pm
content: One more thing. Are there push buttons connected to P1.0 to P1.3? Do you have pull-ups in P1.0 and P1.1? From the data sheet: "The Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7 provide internal pull-ups. P1.0 and P1.1 require external pull-ups."

author: TheInfernoMan
author_rank: Contributor
timestamp: January 15, 2017, 09:18:21 pm
content: Yes it is so, the push buttons are at P1.0-P1.3 with pullups at P1.0 and P1.1
Help with DE1-SoC  I2C Mux - Page 1
Forum section: electronics / general

author: Medjber
author_rank: Newbie
timestamp: January 17, 2017, 09:24:08 pm
content: Hi,How can I control the I2C Mux from the user space on de1-soc?Thanks.Sent from my Blackphone 2 using Tapatalk

author: Scrts
author_rank: Frequent Contributor
timestamp: January 18, 2017, 01:18:57 pm
content: I guess using the switches?
STM32F103 PWM timer3 output - Page 1
Forum section: electronics / general

author: icamaster
author_rank: Contributor
timestamp: January 15, 2017, 08:09:10 pm
content: I am trying to generate a clock of 1.4MHz using the STM32F103C8Tx using the STM32CubeMX.First of all, in my code I have pin PB13 as output and in main I toggle it every one second. This works.Now the more important part. Things I have set up in CubeMX :I have set up the base clock of the device to 28MHz.TIM3 Channel2 :PWM Generation CH2Internal ClockTimer3 :Here is the code :https://gist.github.com/icamaster/e45649478a2e01d5beb46f4313e79e9cApart from the generate part, I have added these lines before the while(1) in the main :HAL_TIM_PWM_MspInit(&htim3);HAL_TIM_PWM_Start(&htim3,TIM_CHANNEL_2);Where the *_MspInit function is :Code:void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_pwm){if(htim_pwm->Instance==TIM3){/* USER CODE BEGIN TIM3_MspInit 0 *//* USER CODE END TIM3_MspInit 0 *//* Peripheral clock enable */__HAL_RCC_TIM3_CLK_ENABLE();/* USER CODE BEGIN TIM3_MspInit 1 *//* USER CODE END TIM3_MspInit 1 */}}The LED is blinking at the set interval but I have no output on the pin A7 (Timer3 channel 2). This is verified on the oscilloscope.

author: Brutte
author_rank: Frequent Contributor
timestamp: January 15, 2017, 08:25:14 pm
content: Cross postwarning

author: newbrain
author_rank: Super Contributor
timestamp: January 15, 2017, 11:11:51 pm
content: Look carefully at you setup value for period and pulse and their meaning.
Lightweight Mesh NWK_ACK - Page 1
Forum section: electronics / general

author: piotrvv
author_rank: Newbie
timestamp: January 13, 2017, 10:04:56 am
content: Hello.I try to do end device with repetition of transmission and I want to clarifying some information.I activated:Code:appNwkDataReq.options = NWK_OPT_ACK_REQUEST | NWK_OPT_ENABLE_SECURITY;inCode:void appSendData(void)Q1. Does NWK_ACK works without enabled NWK_ENABLE_ROUTING?Q2. Does NWK_ACK works without enabled #define NWK_ENABLE_ROUTE_DISCOVERY?Q3. Where I should get information about: NWK_NO_ACK_STATUS?Code:void appDataConf(NWK_DataReq_t *req)is the right place?If so...Q4. When NWK_NO_ACK_STATUS information is available?AfterCode:#define NWK_ACK_WAIT_TIME 1000time? Or maybe somewhere earlier?Q5: Which program events callCode:void appDataConf(NWK_DataReq_t *req)"?Best regards,piotrvv

author: ataradov
author_rank: Super Contributor
timestamp: January 13, 2017, 05:34:22 pm
content: Quote from: piotrvv on January 13, 2017, 10:04:56 amYes, it does. But you still will be able to communicate only with devices within the range, obviously. But they should acknowledge the received frames.Quote from: piotrvv on January 13, 2017, 10:04:56 amAbsolutely.Quote from: piotrvv on January 13, 2017, 10:04:56 amThat would be the only place.Quote from: piotrvv on January 13, 2017, 10:04:56 amAt the moment this function is called. And it will be called after ACK wait time if no ack is received.Quote from: piotrvv on January 13, 2017, 10:04:56 amIt is called only in response to NWK_DataReq(). If there is no pending response, then this is just another function. It has no special meaning, it takes the meaning as a request callback when you specify it as a parameter of the request.
IceStorm Open Source FPGA tools. - Page 1
Forum section: electronics / general

author: hamster_nz
author_rank: Super Contributor
timestamp: January 10, 2017, 10:20:40 pm
content: I recently purchased a myStorm BlackIce FPGA board, with a Lattice iCE40 on it, so I would have one board where I could play with the Open Source FPGA tools - seehttps://mystorm.uk/for info on the board.I am gobsmacked with how mature it is, in that it all works really well and is really fast - just clone a few Github repos, 'make; make install' the, and you are up and running.I need to try building a few more complex things, but it looks viable to use for dipping your toes into the FPGA waters - maybe even preferable due to its speed and low resource requirements.You could most likely run this fine on a Raspberry Pi.I've documented my first tiny project athttp://hamsterworks.co.nz/mediawiki/index.php/MyStorm_Blackiceif anybody is interested...

author: ebclr
author_rank: Super Contributor
timestamp: January 10, 2017, 11:00:23 pm
content: From where did you purchase this board ?

author: hamster_nz
author_rank: Super Contributor
timestamp: January 11, 2017, 12:46:23 am
content: Quote from: ebclr on January 10, 2017, 11:00:23 pmFromhttps://forum.mystorm.uk/t/last-10-mystorm-blackice-boards-available/132Quote

author: KE5FX
author_rank: Super Contributor
timestamp: January 11, 2017, 01:02:15 am
content: Very nice. Does it matter if you use the 64-bit or 32-bit Ubuntu VM?
Atmel Studio compilation stats - Page 1
Forum section: electronics / general

author: dan3460
author_rank: Frequent Contributor
timestamp: January 07, 2017, 01:32:40 am
content: I have a quick question abut Atmel Studio 7. When building a solution there are some stats shown in the middle of the output window such as this:Code:textdatabssdechexfilename562617831583516cbCurrentSensor.elfDone executing task "RunCompilerTask".Using "RunOutputFileVerifyTask" task from assembly "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application\AvrGCC.dll".Task "RunOutputFileVerifyTask"Program Memory Usage:5804 bytes 17.7 % FullData Memory Usage:209 bytes 10.2 % FullDone executing task "RunOutputFileVerifyTask"The program memory usage and the data memory usage relate to the space on the chip that I'm working on?

author: ataradov
author_rank: Super Contributor
timestamp: January 07, 2017, 01:49:08 am
content: Yes. This is a standard output of the avr-size command.Note that depending on your linker script, data memory does not include stack, so you can't go up to 100%.