hybridfree/eevblog-posts huggingface dataset:
Suggestion topic to be pinned at the top: properly install development tools - Page 1
Forum section: electronics / general

author: Bendba
author_rank: Regular Contributor
timestamp: May 22, 2017, 09:00:49 am
content: Hi,I don't know if I'm doing my researches wrong, or just not competent enough but here is my problem:I have an awful lot of trouble installing and finding installation guidelines for microcontroller's development tools.I got Picaxe IDE and Arduino IDE working but they are the easy ones.When it comes to PIC microcontrollers and MPlab X, it is so hard to find what you actually need to install and in which order that I still an not able to use my PicKit3 without crashing all the time, haven't got even as much as a blinking LED. I'm not talking about the language here, but the programming environment.I would like to get into Atmel AVR's too but it's just too overselling to try to get two environments going.I don't know if I'm the only one on that boat but here is the idea. Having a topic gathering resources regarding that subject. I realize that there are so many development environment and computer operating systems that it would be totally impractical to gather actual tutorials here. That's why I think posing links to well constructed tutorial would be better idea, if we agree on a format for the posts so that it stays clear.(For example,"Operating system's name"--> "Development environment's name"-----> link)What do you all think?
Reading an LDR array with a micro - Page 1
Forum section: electronics / general

author: CyberJacob
author_rank: Newbie
timestamp: May 15, 2017, 10:29:04 pm
content: I am trying to repurpose a replica GPO 746 using a micro to replace the phone-line logic, however the rotary mechanism is rather different to that in an original 746.The circuit has 12 LDRs arranged in an array (3 columns, 4 rows), a shutter attached to the dial, and an LED above the shutter. The shutter is arranged so that when the dial is rotated, a single LDR is illuminated by the LED. The finger stop incorporates a microswitch which powers the LED. I've included a rough circuit diagram below.The row and column wires were previously connected to an HM9102D, however I cannot reliably replicate the setup using a Raspberry Pi. Reading the GPIO pins via multiplexing seems to have inputs triggered at random, even when the LED is off.How can I reliably read the inputs from the dial?

author: thm_w
author_rank: Super Contributor
timestamp: May 18, 2017, 11:45:29 pm
content: Since this is a switch matrix you need to scan through the rows and columns, you cant just read inputs.It should work similarly to this:http://hackyourmind.org/articles/raspberry-pi-with-a-keypad-matrixAlthough you may want to check what the open/closed resistance of the LDR is.
Not receiving ack from coordinator - Page 1
Forum section: electronics / general

author: wifiguy11
author_rank: Newbie
timestamp: May 17, 2017, 10:06:08 pm
content: Hey all!I'm currently trying to use the TAL layer example as described inhttp://www.atmel.com/Images/Atmel-42196-Wireless-Product-Development-Using-Atmel-Studio-and-ASF_AP-Note_AT02607.pdfI've adapted the code slightly to emulate another device which uses 802.15.4. The idea is that I can send commands to the coordinator in lieu of this device to troubleshoot certain issues.The main issue i'm coming across is that the tal_rx_frame_cb doesn't seem to be picking up the ack my coordinator is sending. I have verified that the ack is being sent to the device by having a sniffer running close to my setup.Any initial thoughts? Currently I'm thinking the ack is getting sent before I set the trx state to CMD_RX_ON. If this is the case, does anyone have an idea as to how to adapt the code mentioned in the pdf to make it so it can catch Ack frames?Best,wifiguy11

author: wifiguy11
author_rank: Newbie
timestamp: May 18, 2017, 04:51:41 pm
content: For anyone finding this here's what I've done to work around this issue.Within the function tal_tx_frame, I set perform_frame_retry to truetal_tx_frame(&tx_frame_info, CSMA_UNSLOTTED, true);Additionally my application checks for MAC_NO_ACK status condition in tal_tx_frame_done_cb, and lets my process know if I ever don't recieve an ack from the coordinator.If anyone forsees an issue with this solution, feel free to let me know
PowerPC 405GP, Walnut, anyone working on this board? - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: May 16, 2017, 11:24:47 am
content: The last working kernel was 2.6.22From kernel 2.6.26 PowerPC Device Tree Binary (DTB), so ... the support is broken.I tried to fix kernel 2.6.39, PCI_MEM works, but there are problems with PCI_IO.Let me know
Solved, obsolete. - Page 1
Forum section: electronics / general

author: evb149
author_rank: Regular Contributor
timestamp: May 14, 2017, 06:29:37 pm
content: Solved, obsolete.

author: nctnico
author_rank: Super Contributor
timestamp: May 14, 2017, 07:02:09 pm
content: The biggest problem I see that generic Linux needs an MMU and thus lots of extra complexity in logic and requirement for a big cache. Also a softcore isn't very fast anyway. If you really want to run Linux inside an FPGA IMHO the best option is to use a device like the Zync from Xilinx or something similar. Going for a cross platform softcore which can run Linux will be mostly an academic exercise.

author: Boscoe
author_rank: Frequent Contributor
timestamp: May 16, 2017, 11:22:45 am
content: Hi evb149,I looked for what you're after not so long ago however without the need to run Linux. I looked at the Mico while using it in an Altera FPGA and a few others on openCores however found the process for all unattractive, I think the time you would need to spend in streamlining a good, fast development environment wouldn't be worth it. At least for me this is the case as I do actually want to achieve my end goal however much I do enjoy the process. In conclusion, because I like the Altera enviroment over Xilinx, I think I will buy a $500 license for the NIOS II. It does seem like the best option for processor speed, FPGA resources and development tools. The only thing really holding me back is the bad USD to GBP rate at the moment, $500 used to be £250, a long time ago now!EDIT: Having just rang my local distributor I've learnt they do not deal with individuals (good job I run a business) and the license is just for one year. I'll have to think about this one and determine if Ireallyneed it. I do love playing with FPGAs and just about all projects I have in mind or currently undertaking could be made a lot easier and more interesting with a softcore.
DS18B20 problems Raspberry Pi - Page 1
Forum section: electronics / general

author: 5321488
author_rank: Contributor
timestamp: May 16, 2017, 09:03:07 am
content: I am trying to connect a DS18B20 sensor to a raspberry pi. I have done and double checked all the setup code - w1-gpio, w1_therm, added them to startup modules list and added dtoverlay=w1-gpio to config.txt. But the sensor doesn't show up in /sys/bus/w1/devices/ - instead I get a variety of dodgy 00-x00000000 style IDs, with x being a number 1,4,8,6,++. Additionally, the w1_slave directory is not in the device ID directory.Any ideas on what's wrong? Is it a dodgy sensor?

author: Mr.B
author_rank: Unknown
timestamp: May 16, 2017, 09:12:47 am
content: Post your wiring diagram...Are you using it in parasite power mode?If so, are you pulling the data line high with a 4K7 or close to that?Need more information to supply advice.

author: 5321488
author_rank: Contributor
timestamp: May 16, 2017, 09:44:39 am
content: Schematic attached, basically running off 3.3V, data pin pulled high with 4.7K and connected to pin 4 of Pi.I don't know about parasitic power mode.I mostly referenced this tutorial:www.core-electronics.com.au/tutorials/temperature-sensing-with-raspberry_pi.html
How do you sequence power rails? - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: May 21, 2017, 04:12:33 pm
content: This is about the AT91SAM9260 project I am designing. For the sake of simplicity I am using 4 power rails for the chip:* VDDBU: 1.8V backup voltage, sourced from an LP2985-1.8 LDO from the backup battery.* VDDCORE: 1.8V rail for core voltage and PLL (VDDCORE and VDDPLL on the chip,) sourced from a LM3671-1.8 switch mode regulator.* VDDIO: 3.3V rail for digital I/O and memory (VDDIO on the chip,) sourced from an LM3671-3.3 switch mode regulator.* VDDANA: 3.3V rail for analog converters, sourced from an LP2985-3.3 LDO.In the AT91SAM9260 datasheet, there is a specific power sequencing requirement when a backup battery is used: the VDDIO must not be powered before VDDCORE rises above 1.5V, but must rise above VIH within 166us and above VOH within 518us. How do you sequence this? Can I just use the EN inputs of the regulators? Or should I use a few MOSFETs switching the power rails after the regulators have been up, using the system controller MCU for this?

author: NorthGuy
author_rank: Super Contributor
timestamp: May 21, 2017, 04:26:12 pm
content: If your regulators have PG(power good) pins, you just can connect them to the EN pin of the next generator. You need to make sure the voltage levels are Ok.

author: nctnico
author_rank: Super Contributor
timestamp: May 21, 2017, 05:09:30 pm
content: Usually there is a companion power supply chip from the manufacturer or a third party which is tailored to provide the right power supply sequencing. This is the easiest method.

author: BrianHG
author_rank: Super Contributor
timestamp: May 21, 2017, 05:26:50 pm
content: For one of my projects, I used a cheap 50cent PIC as a timer to sequence a bunch of supply rails on my FPGA/DDR2/HDMI-ADC board which had to use 2 different types of cycles depending on if the unit was previously powered on and off, but, the 5v from a HDMI video source stayed on. The manufacturer's data sheet have a bunch of 74HC logic for the HDMI chip + the Altera FPGA had a different custom chip. I said F- it all, put in the PIC and had it not only handle the power enables for the regulators, but, the reset lines & flash boot-prom nConfig reset for the FPGA as well.
CC3120BOOST + CC33xxEMUBOOST - SimpleLinkStudio - trying to use PC as host MCU - Page 1
Forum section: electronics / general

author: crispus
author_rank: Regular Contributor
timestamp: May 15, 2017, 09:09:29 am
content: Hi,I have CC3120boost + CC33xxEMUBOOST and I'm trying to use any example from SimpleLinkStudio.I flashed the service pack 3.3.0.0-2.0.0.0-2.2.0.4 from simplelink_studio_cc31xx_sdk_1_00_00_05/tools/cc31xx_tools/servicepack-cc3x20/sp_3.2.0.0_2.0.0.0_2.2.0.4.binI'm trying to use get_wheather example visual studio project from examples.The board is connected to an Windows 7 machine (all drivers installed, I can see all 4 COM ports) via J6.The output of the program is:Code:*****************************************************************CC3100 Get weather App1.2.0*****************************************************************Global lock is going to be deleated so wait (busyloop) for blocking threads to be released----------------------------------------------------------> _globalLockMutexCounter = 0x0******************************************************************In osi_LockObjDelete(). All threads released. Closing Handle()******************************************************************Error Code -2000Failed to configure the device in its default state, Error code: -2000It doesn't work configured with SPI, nor UART (SL_IF_TYPE_UART).When sl_Start function is called, the return value is 1 (ROLE_UNKNOWN) each time is called from configureSimpleLinkToDefaultStateTried with VS2010 and VS2017.Any hint/tip/help is highly appreciated.Thanks
MPLAB X IDE, Simulator and Register Injection - Page 1
Forum section: electronics / general

author: ggchab
author_rank: Frequent Contributor
timestamp: May 10, 2017, 02:15:22 pm
content: I am trying to use the simulator and the "register injection" in "MPLAB X IDE". This is to send data to the UART. But this requires the use of a "PKT file". I could use a simple file with some text between double quotes but I would like to send hex codes to the UART. Is it possible ? I could not find any documentation about that PKT format. Thank you for any help.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: May 12, 2017, 04:20:38 pm
content: From MPLabX help,Message-Based Data File DescriptionCode:Data in the file will be interpreted in packets as follows:•HEX-style – spaced, separated hexadecimal numbers will be treated as one packet, e.g., 05 07 6A 6B 105 107.Since the UART is 9-bits wide, receive values larger than 0x1FF will be masked off.•RAW-style – text between a pair of quotation characters (") will be treated as one packet, e.g., "this is a packet"Two commands will be supported to specify the wait time between two packets:•wait n unit – where n is a non-negative integer (0 to 264-1) and unit is any time unit (ps, ns, us, ms, sec, min, hr).This command specifies the time period to wait before the next packet will be injected. If unit is invalid, then waitdefaults to 0 seconds.•rand lower upper unit – where lower and upper are non-negative integers (0 to 264-1, lower < upper) and unit isany time unit (ps, ns, us, ms, sec, min, hr). This command specifies a random time period, bounded by lower andupper, to wait before the next packet can be injected. If unit is invalid, then rand defaults to 0 seconds.If there is a parsing error for either command (e.g., out-of-bound n, lower, or upper, insufficient number of parameters),the command will be treated as wait 0 sec.A comment line in the data file will begin with two forward slash characters in the first and second character position,e.g. //. An empty line will be ignored.Adjacent packet lines between wait, rand, and <EOF> will be concatenated as one single packet (without the newline character present at the end-of-line).Example:-Code:wait 100 us48 45 4C 4C 4F 0d 0arand 10 100 ms57 4F 4C 44 0d 0a

author: ggchab
author_rank: Frequent Contributor
timestamp: May 12, 2017, 06:52:10 pm
content: Thank you. I did not find it
PICkit3 low pin count demo board - Page 1
Forum section: electronics / general

author: PerranOak
author_rank: Frequent Contributor
timestamp: May 06, 2017, 01:26:57 pm
content: Hi,I was looking at the PICkit3 low pin count demo board on RS Components. It shows a picture of a fully populated board and two unpopulated boards. The text says that included in the product is a board and two PICs.I cannot tell whether this means that the board includes the LEDs, pot, etc. or is it unpopulated and the picture is just a guide as to how to build it.Has anyone bought one? Could you please confirm which is true.Thank you.

author: Ian.M
author_rank: Super Contributor
timestamp: May 06, 2017, 01:40:30 pm
content: If you buy an older low cost demo board on its own, Microchip throw in two blank PCBs with the assembled board so you can easily build a 'modded' version without any on-board hardware that conflicts with your application. This does NOT include sales where the demo board is bundled with a programmer as a starter kit. IIRC it also doesn't apply to newer boards like the Xpress or Curiosity series or to full development boards or Pictail boards.

author: PerranOak
author_rank: Frequent Contributor
timestamp: May 12, 2017, 04:20:23 pm
content: Thank you!The kit arrived with the extra boards as promised!
Averaging of N-X ADC sample algorithm - Page 1
Forum section: electronics / general

author: ggchab
author_rank: Frequent Contributor
timestamp: May 12, 2017, 11:51:14 am
content: I read in the application note AN4073 of STMicroelectronics that the averaging of N-X ADC sample algorithm is a better method than the classic average of N samples.So, the samples are stored in a table. They are sorted and the X/2 first and last samples are discarded (the ones that are probably the most dispersed). The average is then calculated for the remaining samples.Is it really better than the classic average and is it worth the additional memory needed ? (I am doing this on a little PIC18F)Thank you

author: Rerouter
author_rank: Super Contributor
timestamp: May 12, 2017, 12:49:54 pm
content: What your after is not really an average, but a statistical filter, like mode or median, in reality all 3 of these approaches are more computationally expensive because you need to sort them,What you may want to try is a limited difference average, where outside of the window the values get scaled down to have less influence, such an approach is only slightly more expensive than an average, and only needs slightly more ram than a single value average.

author: Ian.M
author_rank: Super Contributor
timestamp: May 12, 2017, 01:16:52 pm
content: Its fairly simple to do N-X averaging for X=2 as long as you are decimating. If you are trying to do a rolling average its a lot more computationally expensive.e.g. Take ten readings and sum them, while tracking the max and min value, then at the end of the the group of ten, subtract the max and min from the sum then divide by eight to get the result.The only extra overhead is two compares per sample and the subtracts at the end.For x>2 it gets fugly and is best avoided . . . .

author: ggchab
author_rank: Frequent Contributor
timestamp: May 12, 2017, 01:59:16 pm
content: Thanks to both of you.The min and max method seems very simple to implement :-) I will try it.Envoyé de mon SM-G920F en utilisant Tapatalk
ATmega328 High Voltage Programming - Page 1
Forum section: electronics / general

author: salvodi89
author_rank: Contributor
timestamp: May 07, 2017, 01:30:43 pm
content: Hello Everyone!Does anyone ever tried to rescue ATmega328 with high voltage programming?I'm using AVR Dragon to rescue 20 microcontroller with locked fuses!I made an adapter board, to connect the device I followedDevicesheet SCKT3200D2, but I'm not sure of connections because it specifies connections only for 28 pin devices.So I made my own cross table (attached).Nothing to do... with my adapter I'm able to program (fresh devices) in ICSP mode and read Programmed devices, but it won't work in HV Programming mode...I get the following error:QuoteQuoteAny idea? Are my connections wrong?Thank you!

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: May 07, 2017, 03:51:34 pm
content: All the connections appear to be correct.

author: cv007
author_rank: Frequent Contributor
timestamp: May 07, 2017, 05:12:04 pm
content: AVcc ??Been a long time since I touched an AVR, so I'm not sure if AVcc left unconnected matters or not in HV programming (the datasheet shows to connect it in HV programming- so probably needed).A project I created long ago, when my Dragon seemed to be screwing with my avr's when trying to enter debug mode-http://www.mtcnet.net/~henryvm/4AvrFuseBuster/

author: salvodi89
author_rank: Contributor
timestamp: May 07, 2017, 10:48:03 pm
content: Thank you!Quote from: cv007 on May 07, 2017, 05:12:04 pmI left unconnected... but now I connected and I'm able to program in high voltage mode!Where did you find it in the datasheet?

author: cv007
author_rank: Frequent Contributor
timestamp: May 08, 2017, 01:10:34 am
content: QuoteFigure 31.1 (don't see any mention in the text, though). Also note that 5.2.7 indicates AVcc is used to power PC3:0, so without AVcc power those pins don't work. Like I said, I haven't touched an avr in a long time, and this may be common knowledge for the avr freaks (I am a former freak).

author: westfw
author_rank: Super Contributor
timestamp: May 08, 2017, 04:03:29 am
content: ALL the power pins (and GND pins) of an AVR need to be connected, all of the time.Not doing so is a "frequently made error" of AVR beginners. The datasheet says:[size=0pt]Quote[size=0pt][size=0pt]

author: salvodi89
author_rank: Contributor
timestamp: May 09, 2017, 10:57:42 am
content: Thanks everyone!Just a little bit off topic:Does I need a pull-up resistor when I try to program in ICSP mode?

author: cv007
author_rank: Frequent Contributor
timestamp: May 10, 2017, 06:06:55 pm
content: QuoteBasically, no. Atmel has a lot of documentation on many subjects, AVR910 may be of interest to you.

author: salvodi89
author_rank: Contributor
timestamp: May 11, 2017, 08:23:07 am
content: Thank you!I know that I MUST read documentation but sometimes is better to ask someone expert!
MAX487EPA+'s interface to Pic18 Microcontroller - Page 1
Forum section: electronics / general

author: muthukural001
author_rank: Regular Contributor
timestamp: May 05, 2017, 11:02:03 am
content: Hello all,I want to use MAX487EPA+ as RS-485 Transceiver to send data to PC. I wonder that how to interface it to PIC18 Micro-controller. I don't see any of SPI,UART and I2C in MAX487EPA+ IC. Anyone crossed across this issue?Thanks,Muthu

author: igendel
author_rank: Frequent Contributor
timestamp: May 05, 2017, 11:06:17 am
content: RS485 ICs usually have "DI" (Data In) and "DO" or "RO" (Data/Receiver Out) pins, which you can connect to your PIC's TX and RX pins respectively. Pay attention to voltages in the ICs, and to the Enable pins that determine the direction of data transfer.

author: muthukural001
author_rank: Regular Contributor
timestamp: May 05, 2017, 11:40:43 am
content: Thanks. PIC18F4620 has single UART. I have already used that UART for serial communication. Results in no UART interface for MAX487EPA+. So, How should I approach further?Taking Micro-controller with multiple UART is the solution?Thanks,Muthu

author: igendel
author_rank: Frequent Contributor
timestamp: May 05, 2017, 12:00:13 pm
content: Quote from: muthukural001 on May 05, 2017, 11:40:43 amSimplest answer is yes - if you can move to an MCU with more UARTs, you should do it.However, if you define your system requirements very carefully, sometimes you can find other ways. For example, you can send data from TX to two devices at once, if you can "teach" each one to ignore messages intended for the other; if the devices never have to communicate at the same time, you can use a multiplexer to choose where to direct your signals... etc.

author: BrianHG
author_rank: Super Contributor
timestamp: May 05, 2017, 03:36:37 pm
content: There is always a software UART, interupt trigger on your RX input pin + timer, but, unless you have done this before and know what you are in for, just get a PIC with multiple UARTs. Also, if you only need to use 1 com at a time, you can always use the UART alternate pins as a second set, but you will need to manually switch back and forth making sure the TX pins stay high on the swap.
Li-ion battery selection - Page 1
Forum section: electronics / general

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 06, 2017, 03:37:57 am
content: I am looking at Li-ion battery chemistries that would be suitable for inductive / motor loads. Basically my loads are bldc motors and the total wattage would be around 30 watts.Fromhttp://batteryuniversity.com/learn/article/types_of_lithium_ionI see that NMC battery seems to be well suited for this is has good energy density, specific power, safety cost performance and lifetime.The Lithium Iron Phosphate(LiFePO4) battery also looks interesting although its energy density is low compared to the other Li-ion chemistries but it is highly safe.A search on amazon revealed that Panasonic is a reputed and reliable source of these batteries and they generally go in the 18650 form factor however the battery chemistry is stated as NCR, any idea how NCR compares to the NMC battery?I'm open for Any other suggestions for battery chemistry to power the loads I stated earlier.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: May 06, 2017, 04:49:53 pm
content: I want to delete this message because I want to post it in the right section but when I try to delete the first post it saysQuote
New Scope & Function Generator for $25! - Page 1
Forum section: electronics / general

author: ocw
author_rank: Regular Contributor
timestamp: April 26, 2017, 11:23:15 pm
content: Looking

author: Kalvin
author_rank: Super Contributor
timestamp: April 27, 2017, 07:45:45 am
content: Not wanting to hijack the thread, but there is quite similar product available using more capable device LPC4370 in similar price range for EUR 18:http://www.embeddedartists.com/products/lpcxpresso/lpclink2.phpThe board is used for the basis for the mixed signal oscilloscope, logic analyzer and signal generator:- 11 channel logic analyzer (up to 100Msamples per second)- 2 channel oscilloscope (up to 60 Msamples per second, 6MHz BW)- 11 channel digital signal generator (up to 80 Msamples per second)- 2 channel analog signal generator (40kHz BW)However, the adapter board containing the op amps and signal conditioning costs around 99 EUR:http://www.embeddedartists.com/products/app/labtool.phpThere is a schematics and software available for the adapter board which can be used as a basis for a DIY project.

author: ataradov
author_rank: Super Contributor
timestamp: April 27, 2017, 07:49:09 am
content: Quote from: Kalvin on April 27, 2017, 07:45:45 amNot to mention that it is also the best CMSIS-DAP debugger in the sane price range.Everything Renesas is heavily overpriced, let automotive people deal with that.
BitCloud - ZigBee received payload too large, Coordinator just rejects it - Page 1
Forum section: electronics / general

author: rfleming
author_rank: Regular Contributor
timestamp: September 01, 2016, 04:16:14 am
content: Hi Guys,I have found a device that I have tried to integrate with my Coordinator and have found that when I read on its Manufacturer Name in the Basic Cluster, it returns a 57 character attribute that in turn creates a 107 character frame. This frame seems to be just rejected by the coordinator because it is simply "too large".I have also seen this with another device when I did an attribute discovery for 20 attributes, the 20 attributes were too long in length for a frame so they were simply "rejected" but when I changed it to 5, it worked fine.Any tips on how to read this long length would be awesomeRyan.

author: ataradov
author_rank: Super Contributor
timestamp: September 06, 2016, 02:47:25 pm
content: Coordinator should receive payloads like this without problems. It is likely that ZCL layer parser rejects this for some reason. I would look at APS_DataInd function in the ZCL to see if raw payload is received there.Sorry for the delay, I was on vacation.

author: DownTown
author_rank: Newbie
timestamp: April 26, 2017, 09:45:03 am
content: I think from the spec *refer the picture attached* you cannot set the manufactures id above 32 byte! that could be the reason why the stack is rejecting it.May be if you could find the the code where it actually checks for the length and increase it might work.
DE0 board getting started - Page 1
Forum section: electronics / general

author: mn
author_rank: Contributor
timestamp: May 04, 2017, 02:30:28 pm
content: We have a DE0 (www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=364) board and the manual is quite straight forward. Consider this simple counter codeCode:library ieee;use ieee.std_logic_1164.all;entity counter2 isport( clk, rst: in std_logic;q: out integer range 0 to 31);end;architecture x of counter2 isbeginprocess( clk, rst )variable tmp: integer := 0;beginif ( rst = '1' ) thentmp := 0;elsif (clk'event and clk = '1') thentmp := tmp + 1;if ( tmp = 32 ) thentmp := 0;end if;end if;q <= tmp;end process;end;According to the manual (http://www.terasic.com.tw/cgi-bin/page/archive_download.pl?Language=English&No=364&FID=0c266381d75ef92a8291c5bbdd5b07eb), the push button pins are described in page 27 fig 4-5F1 -> CLKG3 -> RSTAnd the LEDs are described in page 28, fig 4-8 (J1, J2, J3, H1, F2). I configured the chip with these pins. As you can see in the attached picture, the programming phase is done successfully and I see that board initial works (flashing leds) are stopped for programming. However, as I press the buttons, the LEDs don't work. If you look at the attached board picture, the five bits (output q) are turned off which shows the board is configured.Any idea to debug more?

author: mn
author_rank: Contributor
timestamp: May 04, 2017, 02:58:23 pm
content: Excuse me. I made a mistake. The buttons high positions are (1) so the circuit was always in the reset mode. Please remove this topic.
Faulty FPGA? - Page 1
Forum section: electronics / general

author: Boscoe
author_rank: Frequent Contributor
timestamp: April 23, 2017, 02:25:13 pm
content: I'm having some strange issues with an FPGA on a custom board. I had copied and pasted he design and layout from a previous project that didn't have any issue so I'm confident the design is okay.The issues I'm having are:- A few GPIOs do not go to the VCCIO voltage (3.3V) instead they only reach around 1.4V and are very flaky with the pressure I apply with the probe making a difference.- I'm try to use a PLL to create 80MHz from 100MHz which isn't working at all.I assembled the PCB myself, the FPGA is an EP4CE6E22N, I've assembled a lot of PCBs in my time so confident it's okay. Could these issues be caused by ESD or a faulty IC?Thanks

author: radar_macgyver
author_rank: Frequent Contributor
timestamp: April 23, 2017, 02:46:58 pm
content: Quote from: Boscoe on April 23, 2017, 02:25:13 pmSounds like a dry joint to me, possibly on a power pin.

author: Boscoe
author_rank: Frequent Contributor
timestamp: April 23, 2017, 03:29:37 pm
content: I forgot to mention if I assign the pin a value such as 'ft_nrst = 1' in the signal list in the top module without any other driver I get the issue however only on a couple of pins. If I do not assign it in the signal list and do 'assign ft_nrst = 1' in the code section it does work. Anyone know why this might be the case?

author: Daixiwen
author_rank: Frequent Contributor
timestamp: April 24, 2017, 07:28:39 am
content: Is the exposed pad properly connected to ground? A common problem on the E144 package is a bad connection on the exposed pad, giving all kind of weird problems.

author: marshallh
author_rank: Unknown
timestamp: April 25, 2017, 02:26:02 am
content: Quote from: Daixiwen on April 24, 2017, 07:28:39 amThis, all sorts of weird phenomena occur if the center pad is not WELL soldered. If you want to hand solder it you bascally have to make a board cutout and manually solder it from underneath. Never had a problem reflowing them.
STM8 ADC multi-channel scan mode - Page 1
Forum section: electronics / general

author: HwAoRrDk
author_rank: Super Contributor
timestamp: April 21, 2017, 02:42:23 pm
content: I have been investigating the STM8S range for use instead of an ATmega328P in a project of mine. (Gotta love the fact they're half the price, even in single-digit quantities.)Was looking in the reference manual at the ADC capabilities, and the multi-channel scan mode caught my eye as being something that might be very handy. But I have a couple of queries:- Is multi-channel scan modeonlycapable of scanning from AIN0 upwards? That is, you can't start from, for example, AIN3? That seems rather inflexible in terms of pin usage.- Can scan mode definitely be used in conjunction with conversion triggering from timer? It would seem logically possible by just setting both SCAN and EXTSEL of ADC_CR2 appropriately, but you never know with these things, so I thought I'd check.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: April 22, 2017, 10:49:06 am
content: Anyone?

author: JPortici
author_rank: Super Contributor
timestamp: April 22, 2017, 10:56:45 am
content: state the part, link to datasheet please.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: April 22, 2017, 11:39:40 am
content: I'm considering the STM8S105 or STM8S005. The datasheets don't have that information, and the reference manual isn't particularly explicit - that's why I'm asking.

author: JPortici
author_rank: Super Contributor
timestamp: April 22, 2017, 12:56:20 pm
content: I think it means that it will sample and convert from IN0 to INn so no you can't. Maybe you want it like on certain pics where you select which channels to scan. could be only IN2 and IN9 for example

author: Jeroen3
author_rank: Super Contributor
timestamp: April 22, 2017, 02:11:44 pm
content: Look in thereference manual. (RM0016)1. From AIN0 only.QuoteWhere channel 'n' is defined in CH[3:0].Other variants of ST ADC's feature sequence registers, see it as a playlist you can set for channels. Or scan mode from low to high with a mask register. Where only the enabled channels are in the scan. But the STM8 you mentioned do not have this.Get an STM32's for more advanced ADC.2. You can start the scan from a trigger.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: April 22, 2017, 02:38:55 pm
content: Thank you.I had seen that paragraph from the reference manual, but for some reason my first impression was that they were giving an example, not stating a limitation. But it seemed too inflexible to be of the greatest utility, so I had my doubts as to whether they really meant it.Of course, had I looked at the register reference a bit closer, it would probably have dawned on me that there is otherwise no way to specify a scan sequence/mask/etc. like you say there is on the STM32, so therefore it must be limited to AIN0 as a start point.I suppose it's not so much of a bother if you're using the 48- or 44-pin versions.
ECU and Knock Sensors. - Page 1
Forum section: electronics / general

author: firewalker
author_rank: Super Contributor
timestamp: April 19, 2017, 11:31:32 am
content: What method an automotive ECU (or PCM) uses to detect abnormal signal from knock sensors?And to make more general what methods are there to trigger on particular (low frequency) signal with an MCU? FFT analysis and comparison to a preset table?Alexander.

author: johnkenyon
author_rank: Regular Contributor
timestamp: April 19, 2017, 12:52:22 pm
content: Does this help/point you in the right direction?http://www.azosensors.com/article.aspx?ArticleID=50

author: MattSR
author_rank: Regular Contributor
timestamp: April 19, 2017, 11:11:24 pm
content: What do you mean by "abnormal" signal? A faulty sensor? Or an engine that is knocking?Typically a knock sensor uses a bandpass filter tuned to the knock frequency for your engine (which is determined by cylinder bore diameter) and then the output of this filter is mapped to a table versus RPM.. once the put exceeds the table in the threshold, the ECU triggers a flag as a knock event.As for the methods, there are two types of knock sensors - wideband and resonant. The resonant sensors being physically/mechanically tuned to the knock frequency.The wideband sensors need either DSP or analog filtering.

author: firewalker
author_rank: Super Contributor
timestamp: April 20, 2017, 06:48:16 am
content: I was referring to the method used by the ECU (or any mcu) to distinguish between signals. Is it only the amplitude after the filter? Is it a variable filter?Alexander.

author: firewalker
author_rank: Super Contributor
timestamp: April 20, 2017, 07:14:16 am
content: It seems that a method is using spectral analysis and a dsp.http://www.ti.com/lit/an/spra039/spra039.pdfAlexander.

author: MattSR
author_rank: Regular Contributor
timestamp: April 21, 2017, 01:47:13 am
content: Yep, A company based in Greece called Plex Tuning make an excellent Knock Monitor that has all the DSP signal conditioning parameters as being programmable as a function against RPM. Although it doesn't go into as much detail as the Ti paper, it's quite an interesting device and it compares very well to other aftermarket ECUs, such as MoTeC M150, Haltech Elite etc.The user manual gives some nice info on how this particular device works. -->http://www.plex-tuning.com/products/plex-knock-monitor/
Recommended smd replacements for DIP40 packaged 80C31 and 80C32 mcu's. - Page 1
Forum section: electronics / general

author: AndersJ
author_rank: Frequent Contributor
timestamp: April 03, 2017, 02:19:58 pm
content: 80C31 and 80C32 DIP40 mcu's are more and more difficult to purchase.Not to mention EEPROM and RAM, often used in these legacy systems.To avoid rewriting software I would like to replace theses mcu's with smd devices,with internal flash and RAM, and legacy on board peripherals such as timers, UARTs, etc.Device suggestions are extremely welcome.

author: up8051
author_rank: Frequent Contributor
timestamp: April 03, 2017, 02:49:58 pm
content: Atmel/Microchip: AT89S51, AT89S52, AT89C51, AT89C52 ...Nuvoton: W78 seriesI think most popular body is PLCC44.Regards,up8051

author: danmcb
author_rank: Regular Contributor
timestamp: April 11, 2017, 03:39:21 pm
content: I have a few tubes of unused Atmel EEPROM based 40 pin DIP 8051's if you are interested. I will never use them. If you are interested PM me and I will give you more info.

author: pelule
author_rank: Frequent Contributor
timestamp: April 11, 2017, 07:29:31 pm
content: If I remember correct, the 8051(8751 could be used as 8031 if the EA pin was connected in the correct way.Similar was with 8051/8752 and 8032./PeLuLe

author: ohdsp
author_rank: Contributor
timestamp: April 12, 2017, 04:04:10 pm
content: Maxim do the DS80C320/DS80C323 parts in PDIP and PLCC and TQFP. They look expensive though.Porting over to a newer platform/chip could help with long term headaches if it is ever an option.

author: technix
author_rank: Super Contributor
timestamp: April 14, 2017, 12:01:28 am
content: If you don't mind a changed footprint, you can try the STC15 series. Start with the top-of-the-line IAP15W4K61S4 (modern 1T core, 30MHz, 2.7-5.5V operation, supported on-chip debug) and work your way down their product tree.

author: ebclr
author_rank: Super Contributor
timestamp: April 17, 2017, 06:09:47 pm
content: I have a Rail of 80C31 never used any interest ?

author: technix
author_rank: Super Contributor
timestamp: April 18, 2017, 12:13:51 am
content: Quote from: ebclr on April 17, 2017, 06:09:47 pmDIP or PLCC?

author: ebclr
author_rank: Super Contributor
timestamp: April 18, 2017, 12:17:07 am
content: DIP

author: technix
author_rank: Super Contributor
timestamp: April 18, 2017, 12:29:01 am
content: Quote from: ebclr on April 18, 2017, 12:17:07 amHow many of them do you have? And how much are you willing to sell them at? Also, date code?

author: ebclr
author_rank: Super Contributor
timestamp: April 18, 2017, 02:30:57 am
content: Where are you ?

author: technix
author_rank: Super Contributor
timestamp: April 18, 2017, 04:12:56 am
content: Quote from: ebclr on April 18, 2017, 02:30:57 amShanghai, China
DSP hardware books - Page 1
Forum section: electronics / general

author: goldcoin
author_rank: Contributor
timestamp: April 15, 2017, 06:03:04 pm
content: Does anyone know some good digital signal processing hardware books that cover dsp design from the transistor level to architectures ?

author: goldcoin
author_rank: Contributor
timestamp: April 16, 2017, 05:51:56 pm
content: @evb149: Thank you for the response and resources.

author: danmcb
author_rank: Regular Contributor
timestamp: April 17, 2017, 12:03:42 pm
content: Two separate (overlapping) topics. You are really looking, I think, for one book about how VLSI and beyond is actually made from silicon, to the level of gates and various building blocks. And another about DSP, with hardware implementations.
TouchGFX 4.8 Bugs - Warning - Page 1
Forum section: electronics / general

author: ehughes
author_rank: Frequent Contributor
timestamp: April 16, 2017, 02:56:12 am
content: Just a warning if anyone was considering TouchGFX 4.8It is broken "out of the box"https://community.nxp.com/thread/449309Turns out the problem is that it does not clear the back buffer as a default option.... Hope this is helpful to anyone looking at the product.
RaspberryPi Domoticz - MAINS AC Dimmer - Page 1
Forum section: electronics / general

author: trackerj123
author_rank: Newbie
timestamp: April 05, 2017, 12:32:59 pm
content: http://www.esp8266-projects.com/2017/04/raspberry-pi-domoticz-ac-dimmer-part-1.htmlThis time we will directly connect the MPDMv4 MAINS AC Dimmer board to a Raspberry PI and we will drive it using the PWM signal provided by the RPi Board thru the onboard gpio extension header:In Part 2 we will continue with the related Domoticz setup & tests.

author: TJ232
author_rank: Frequent Contributor
timestamp: April 14, 2017, 08:14:49 am
content: Part 2: Domoticz Setup and live testing:https://www.youtube.com/edit?o=U&video_id=z-eSTDL9qdYRelated source code can be found in the related post here:http://www.esp8266-projects.com/2017/04/part-2-raspberry-pi-domoticz-ac-dimmer.html
Debugging embedded systems - Page 1
Forum section: electronics / general

author: wrynczuk
author_rank: Newbie
timestamp: April 12, 2017, 05:16:10 pm
content: Some time ago I created a free and open application which facilitates debugging embedded systems. It just allows for an easy visualization of text log files. It might be used to debug small and large systems. Since its first release the application has grown a little. Currently, there are Windows and Linux distributions available. It also allows for merging logs from different sources.I strongly encourage you to give it a try.Just visitvcdmaker.org. You will find there the application itself, the manual as well as short videos demonstrating what it is.Enjoy it

author: whalphen
author_rank: Regular Contributor
timestamp: April 12, 2017, 09:30:47 pm
content: Thank you. I will try this. I work with local school electronics clubs. We will launch high altitude balloons and log a lot of data from several sensors. This will help us to analyze the data.

author: wrynczuk
author_rank: Newbie
timestamp: April 13, 2017, 07:17:01 am
content: What a great idea! If you use your own logging format than you will have to transform the log to the format expected by vcdMaker. As this is a linear transformation (line to line) it shall not be difficult (e.g. using Python). I can offer my assistance if needed. We are working on removing this limitation so as vcdMaker could parse any format of the user log.Anyway I would be very interested in seeing the results you get. Good luck on flying the balloons! Let the force be with you
Can a Z84C0010PEG be used in place of a normal NMOS Z80A ? - Page 1
Forum section: electronics / general

author: netdudeuk
author_rank: Frequent Contributor
timestamp: April 10, 2017, 09:51:12 am
content: I thought that I had a Z80A but I don't.RS only dohttp://uk.rs-online.com/web/p/microcontrollers/6259078/Would this drop straight into a circuit designed for a Z80A running at 4MHz ?Thanks

author: CJay
author_rank: Super Contributor
timestamp: April 10, 2017, 10:04:17 am
content: Probably, let you know next week when I get around to using the ones I have hereIf you want a 'proper' NMOS Z80A PM me and I'll post you one.

author: grumpydoc
author_rank: Super Contributor
timestamp: April 10, 2017, 11:36:27 am
content: Quote from: netdudeuk on April 10, 2017, 09:51:12 amIn general I would expect that 10MHz part to be a drop in replacement for the 4MHz part, however there will be a shorter time between the reference clock edge for a given transition on the control lines/bus and that transition actually happening.Whether this means the faster part won't work will depend on the system that you plug it into. If you have flip-flops triggered on clock edges as well as control signals it might be worth reviewing the timing but you'd be pretty unlucky to have any issues.I'd just plug it in and see.

author: netdudeuk
author_rank: Frequent Contributor
timestamp: April 12, 2017, 08:34:00 am
content: Thanks guys. I picked one up from RS.I'll need to start building around it before I know how I get on with it.
CAN Bus transceiver replacement - Page 1
Forum section: electronics / general

author: Adam60
author_rank: Regular Contributor
timestamp: April 14, 2017, 04:46:22 am
content: Can anyone tell me how to replace a CAN transceiver in an automotive ECM? Is it a straight swap or is there programming involved? I am just curious. I have one in an instrument cluster that is showing the CAN line shorted and I want to know if I can simply replace the chip. It is available from ST

author: DBecker
author_rank: Frequent Contributor
timestamp: April 14, 2017, 05:17:08 am
content: A CAN transceiver is just a transceiver. There isn't any programming involved. (Well, 'Programmable slew rate' means "resistor-set drive strength", not firmware programming.)Replace with the same part number unless you know what you are doing. The pinout of an 8 pin package is pretty much standardized for 6 pins. The slew rate pin varies between vendors, and the other pin may be used for power-down, low power Rx / wake, I/O voltage, etc.
ZH-W3 controller software - Page 1
Forum section: electronics / general

author: Puffie40
author_rank: Regular Contributor
timestamp: April 10, 2017, 08:23:09 pm
content: I have just taken on a small project with a buddy who has a couple of large programmable LED signs. The vendor disappeared leaving him with no way to program the signs.I just looked them over and they used a ZH-W3 controller to drive P20 arrays. I'm going to sit down tonight and do some research, but I have yet to find some solid documentation on that controller. Is there any help?
SAI CMSIS - Page 1
Forum section: electronics / general

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: April 05, 2017, 08:14:35 am
content: HiThis is my first hands on the SAI interface, here is my codeCode:extern ARM_DRIVER_SAI Driver_SAI0;ARM_DRIVER_SAI *SAI_drv=&Driver_SAI0;void mySAI_callback(uint32_t event){int x=0;switch (event){case ARM_SAI_EVENT_SEND_COMPLETE:/* Success: Wakeup Thread */x=0;__breakpoint(0);break;case ARM_SAI_EVENT_TX_UNDERFLOW:/* Success: Wakeup Thread *///__breakpoint(0);x=1;break;case ARM_SAI_EVENT_RECEIVE_COMPLETE:/* Success: Wakeup Thread *///__breakpoint(0);x=2;break;case ARM_SAI_EVENT_FRAME_ERROR:/* Success: Wakeup Thread *///__breakpoint(0);x=3;break;case ARM_SAI_EVENT_RX_OVERFLOW:/* Success: Wakeup Thread *///__breakpoint(0);x=4;break;}SAI_drv->Send(wave_data,64);}void main (void){SAI_drv->Initialize(mySAI_callback);SAI_drv->PowerControl(ARM_POWER_FULL);// configure Transmitter to Asynchronous Master: I2S Protocol, 16-bit data, 16kHz Audio frequencySAI_drv->Control(ARM_SAI_CONFIGURE_TX |ARM_SAI_MODE_MASTER |ARM_SAI_ASYNCHRONOUS |ARM_SAI_PROTOCOL_I2S |ARM_SAI_DATA_SIZE(16), 0, 16000);// enable TransmitterSAI_drv->Control(ARM_SAI_CONTROL_TX, 1, 0);SAI_drv->Send(wave_data,64);while(1){}}the problem is that after calling SAI_drv->Control(ARM_SAI_CONTROL_TX, 1, 0); the callback would get called with the ARM_SAI_EVENT_TX_UNDERFLOW, no matter how I do the things, I wanted to know do you have any idea what's going on wrong? the callback would not be called any more for continuous data transfer

author: westfw
author_rank: Super Contributor
timestamp: April 07, 2017, 06:07:03 am
content: You mean like this:https://www.keil.com/pack/doc/CMSIS/Driver/html/group__sai__interface__gr.html?Wasn't most the CMSIS 2.x Driver middleware stuff deprecated in CMSIS 3.x (and we're now up to v4)? AFAIK, few of the chip vendors actually implemented the middleware layers - After all, their proprietary peripheral implementations were their big product differentiators, and I don't think they liked having their "superior" implementations reduced to a common abstraction...In any case, to have a hope of debugging/helping with this, we need to know which chip you are using!

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: April 11, 2017, 01:47:37 pm
content: Yes I mean using that, the actual chip I'm using is LPC4337 from NXP.