hybridfree/eevblog-posts huggingface dataset:
Problem in bootloading my atemga32u4 chip - Page 1
Forum section: electronics / general

author: electrowhiz
author_rank: Contributor
timestamp: May 24, 2018, 02:57:39 pm
content: I have created a development board with atmega32u4 . I tried to bootload it with arduino pro micro using SPI interface. My pin connection is as followsVcc-VccGND-GNDReset -pin 10MOSI - 16SCK-15MISO-14I have changed the pin numbers in Arduino ISP program.#define MOSI 16#define MISO 14#define SCK 15I have uploaded the arduino ISP program in the pro micro. Then I made the programmer in Arduino IDE as Arduino as ISP. Then I selected the board as Arduino Leonardo. Then I pressed burn bootloader. But it displayed error message asavrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03Error burning bootloaderWhat may be the problem?

author: JustMeHere
author_rank: Frequent Contributor
timestamp: May 24, 2018, 06:23:08 pm
content: Are you using an external clock? I don't know about the U4 version but the U2 version comes shipped with external clock configured. The documentation says the U2 is configured for internal in some places and external in others.

author: maginnovision
author_rank: Super Contributor
timestamp: May 24, 2018, 07:49:24 pm
content: do you have a schematic and pictures of the soldering? Last time I debugged the issue with a 32 it was a soldering issue from an inexperienced assembler. Obviously not hardware since I designed it. And yes, you need an external clock for fresh chips.

author: electrowhiz
author_rank: Contributor
timestamp: May 25, 2018, 05:41:46 am
content: I am using an external clock 16MHz

author: JustMeHere
author_rank: Frequent Contributor
timestamp: May 29, 2018, 02:26:10 am
content: We are going to need a schematic.And, as suggest above, check for solder errors. Get a lopue, and inspect the solder.

author: electrowhiz
author_rank: Contributor
timestamp: May 29, 2018, 03:39:13 am
content: Yeah I will check the soldering
Motorola MC68882 examples - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: May 27, 2018, 02:16:59 pm
content: hiI am looking for examples for the Motorola M68882 FPU.I need to test a few chip devices intensively since I suspect they are fake/damaged ...(bought from China)

author: MT
author_rank: Super Contributor
timestamp: May 27, 2018, 05:34:59 pm
content: http://www.drdobbs.com/embedded-systems/optimizing-mc68882-code/184409255

author: legacy
author_rank: Super Contributor
timestamp: May 28, 2018, 09:35:53 am
content: Thanks.
Implementing Peter Fleury's UART library - Page 1
Forum section: electronics / general

author: Simon
author_rank: Unknown
timestamp: May 27, 2018, 08:44:56 pm
content: So my knowledge of C is not the most robust but Peters library looks well documented. However I see that before I even give it a go there is a "makefile.uart".OK before i try andwhat do I do with this file? Everything else looks fine, a .c file a .h file and a sample program.

author: ataradov
author_rank: Super Contributor
timestamp: May 27, 2018, 08:52:37 pm
content: Typically you include that into your main Makefile. Or at least look at what "unusual" compiler options are passed in that makefile.In reality it is probably just a part of a big compartmentalized build system, and you can just use the files in your project without even looking at this file.

author: Simon
author_rank: Unknown
timestamp: May 27, 2018, 08:56:22 pm
content: See attached. I use Atmel Studio so I'm not sure what to do with this if anything.

author: ataradov
author_rank: Super Contributor
timestamp: May 27, 2018, 08:58:15 pm
content: Don't do anything with is, just add files to your project. If the code does not compile and complains about some defines missing (like F_CPU), then just define them yourself in the AS project settings.

author: Simon
author_rank: Unknown
timestamp: May 27, 2018, 09:00:31 pm
content: OK thanks
Detecting activation of a low-side switch using a microcontroller - Page 1
Forum section: electronics / general

author: danners430
author_rank: Regular Contributor
timestamp: May 21, 2018, 03:48:20 pm
content: Afternoon ladies and gents,I'm trying to work out a way to connect a microcontroller to a DCC decoder's accessory outputs. The problem is, decoders use low-side switching of accessories, with a common positive rail. Is there a way to detect the activation of the low-side switch using the micro, or is external circuitry required?Cheers!Sent from my ONEPLUS A3003 using Tapatalk

author: fourtytwo42
author_rank: Super Contributor
timestamp: May 21, 2018, 05:39:09 pm
content: Your expecting everybody here to be a railway enthusiast then, if you want answers best not to post TLA's nobody knows! Fortunatly I know as I am a railway enthusiast!, I would imagine you will need external circuitry as the load being switched is probably supplied by a reletevly (in mpu terms) high voltage so if connected directly will blow up your mpu. For example if the load is supplied by +12V then you will need a series resistor and zener diode to limit the voltage swing to within the rateing of your mpu/micro.

author: danners430
author_rank: Regular Contributor
timestamp: May 21, 2018, 07:35:17 pm
content: Quote from: fourtytwo42 on May 21, 2018, 05:39:09 pmThe main question is actually nothing to do with railways, I just added that for context.The main question is how to detect the switching of a low-side switch using a microcontroller, as a low-side switch obviously doesn't supply a nice +5V logic signal.Sent from my ONEPLUS A3003 using Tapatalk

author: james_s
author_rank: Super Contributor
timestamp: May 21, 2018, 07:49:23 pm
content: You could use an opto-coupler, anything that can be made to light an LED can then be interfaced to an IO pin on a microcontroller.

author: danners430
author_rank: Regular Contributor
timestamp: May 21, 2018, 07:51:50 pm
content: Quote from: james_s on May 21, 2018, 07:49:23 pmThat seems logical...Seems logical enough that I'm now kicking myself for not thinking of that Many thanks!!!Sent from my ONEPLUS A3003 using Tapatalk
stm32f0 - Page 1
Forum section: electronics / general

author: alizare368
author_rank: Regular Contributor
timestamp: May 16, 2018, 02:08:14 pm
content: HIHOW CAN I CONTROL A PIN IN THE REGISTRY??GPIOA->MODER ?GPIOA->IDR ?GPIOA->ODR ?

author: ataradov
author_rank: Super Contributor
timestamp: May 16, 2018, 03:15:40 pm
content: It is time to give up on programming microcontrollers if you can't find a way to toggle a pin after all that time.Show us your thinking, nobody will do your work for you, especially with primitive stuff like that.

author: aandrew
author_rank: Frequent Contributor
timestamp: May 16, 2018, 04:17:26 pm
content: Not to mention with that kind of attitude. We are a community of volunteers. We don't owe you anything.Show some respect: Ask your question clearly, show us what you have tried and what happened. There are literally hundreds of STM32 intro pages on the internet, not to mention dozens of demo videos by STMicro themselves.

author: Siwastaja
author_rank: Super Contributor
timestamp: May 16, 2018, 06:50:32 pm
content: HIENABLE RELEVANT PORTX CLOCK IN RCC->XXXENRSET RELEVANT BITS IN GPIOX->MODER TO 00 FOR INPUT, OR 01 FOR OUTPUTWRITE TO GPIOX->ODR TO SET THE OUTPUT VALUEOR READ FROM GPIOX->IDR TO READ THE INPUT VALUE

author: Gibson486
author_rank: Frequent Contributor
timestamp: May 17, 2018, 02:03:23 pm
content: There are...at least.... a dozen places that will tell you how to do it if you google it.

author: newbrain
author_rank: Super Contributor
timestamp: May 17, 2018, 03:29:17 pm
content: There are several ways to monitor for changes in Windows regisrtry, either from C++ or from VB and PowerShell.WMI might be good if you need an asynchronous notification, but simple timed polling in Powershell with Get-ItemProperties might be enough for a basic implementation.I have not investigated if using a System.IO:FileSystemWatcher object works with a path from the Registry virtual FS provider.Once you have this set up, you can write code for your F0 to act as a USB CDC device and toggle pins at your leisure according to commands sent by the Windows program on the relevant COM port. If you have Windows 10 no driver or .inf is needed.Is that what you're after?I somehow suspect it's not...but the question is not very clear, and does not show much effort in finding the answer by yourself.

author: jesuscf
author_rank: Frequent Contributor
timestamp: May 19, 2018, 04:34:53 am
content: I would recommend to check the user manual for details about the registers. Something like this should help you get started:#define BIT0 (1 << 0) ; BIT0 = 0x00000001...#define BIT31 (1 << 31)// Output exampleRCC->AHBENR |= BIT17; // peripheral clock enable for port A// Make pin PA0 outputGPIOA->MODER |= BIT0;GPIOA->MODER &= ~BIT1;// To write to the pin use the ODR:GPIOA->ODR |= BIT0; // PA0=1GPIOA->ODR &= ~BIT0; // PA0=0// Input exampleRCC->AHBENR |= BIT17; // peripheral clock enable for port AGPIOA->MODER &= ~(BIT16 | BIT17); // Make pin PA8 input.// Activate pull up for pin PA8GPIOA->PUPDR |= BIT16;GPIOA->PUPDR &= ~(BIT17);// Read the pin and displayprintf("PA8=%c\r", (GPIOA->IDR&BIT8)?'1':'0');
Verilog, binary to Gray code converter - Page 1
Forum section: electronics / general

author: sevenofnine33
author_rank: Contributor
timestamp: May 14, 2018, 03:48:22 pm
content: Not sure if this is the section to ask, but I am a beginner and don't know much, so I would appreciate the help.I am designing a binary to Gray code converter. This is my main code:module gray_code (bin_num, Gray_num);input [3:0] bin_num; //binary inputoutput [3:0] Gray_num; //gray outputassign Gray_num = bin_num;assign Gray_num = bin_num^bin_num;assign Gray_num = bin_num^bin_num;assign Gray_num = bin_num^bin_num;endmoduleAnd this is testbench:module gray_code_tb;reg [3:0] bin_num;wire [3:0] Gray_num;integer i;gray_code DUT(.bin_num(bin_num),.Gray_num(Gray_num));initial beginfor(i=0;i<16;i=i+1)beginbin_num=i;$display("BIN = %b GRAY =%b", bin_num, Gray_num);endendendmoduleThe output I get after simulation is:BIN = 0000 GRAY =xxxx;BIN = 0001 GRAY =xxxx;BIN = 0010 GRAY =xxxx;BIN = 0011 GRAY =xxxx;Why is it showing all x for Gray code?

author: sevenofnine33
author_rank: Contributor
timestamp: May 14, 2018, 04:04:26 pm
content: Found the problem. In my simulation the time didn't pass. Adding #50 after bin_num=i fixed it.
Interface MCU with PC via USB and SPI protocol - Page 1
Forum section: electronics / general

author: illusive
author_rank: Regular Contributor
timestamp: May 13, 2018, 02:09:34 pm
content: Hi everyone!I'm building myself a temperature controlled soldering station and i would like to add a communication to a PC to visualize certain variables while the systam is operating. Since i have used all the pins of the mcu (atmega328pb) i don't have the RX and TX pins available but i do have the SPI ones because i am already using them for communication with another IC. Ebay is full of simple modules based ot FTDI chips to establish communication between an MCU and PC but i can't find anything widely used to do SPI to USB. I have found couple of ICs that seems to do that but if i am not missing something obvious they require quite the hassle to implement. Im refering to the FT232H and MCP2210. I'm planning to use one of the available serial port graph plotting software and i have concerns that it might be some interfacing problems.Can someone with more experience with these stuff recommend me the best approach to the problem?Thanks!

author: NorthGuy
author_rank: Super Contributor
timestamp: May 13, 2018, 02:30:46 pm
content: Quote from: illusive on May 13, 2018, 02:09:34 pmI would get an MCU which has enough pins and a built-in USB module. As I recall, FT232H is $4 and requires an oscillator ($1). You can buy a good MCU for this.Or, if you can't part with your existing design, get PIC16F1454 ($1, no oscillator required) and program it as an USB to SPI bridge.Of course, if money is not important, FT232H will work.FT232H also has GPIO pins. It doesn't have programmable brains, but you can manipulate the pins directly from PC. Thus if your design requires PC connected at all times, it might be possible to get by with FT232H alone, without any MCU.

author: martinayotte
author_rank: Regular Contributor
timestamp: May 13, 2018, 03:03:05 pm
content: A STM32F103 BluePill board should do the job ...

author: andersm
author_rank: Super Contributor
timestamp: May 13, 2018, 03:14:21 pm
content: FTDI also have the FT220X, which costs a little under two bucks, and doesn't require a crystal.

author: hans
author_rank: Super Contributor
timestamp: May 13, 2018, 03:44:50 pm
content: Also consider which chip is SPI master and which is going to be slave. I think most USB chips only work as SPI master. If your ATMEGA328P is also a master (which is typical in a single MCU design), that could create a conflict. An UART is easier, because it's asynchronous and has no master.It may sound weird, but you could get a chip like a MAX3100 (SPI slave <> UART) and connect that to a normal USB serial cable.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: May 14, 2018, 01:47:48 am
content: If it's a temporary solution you're after, hooking an Arduino board up as an SPI slave and writing some simple code to re-transmit each byte received out its serial port will be quite easy.Oh, by the way: you say you have used all your I/O pins. Don't forget even an SPI solution will need an extra I/O for the chip-select (CS) of the additional slave.
CCS Prime8 Production Programmer for PIC18 - Page 1
Forum section: electronics / general

author: tarun172
author_rank: Regular Contributor
timestamp: May 11, 2018, 01:50:38 pm
content: Can people share their experience with using Prime8 production programmer for PIC microcontroller? It is pricey at $ 899. Here is the link:http://www.ccsinfo.com/product_info.php?products_id=P8_gang.Is it worthwhile to use or just a hassle?- Tarun S
DIY ICSP eeprom programmer? - Page 1
Forum section: electronics / general

author: Chriss
author_rank: Frequent Contributor
timestamp: May 10, 2018, 08:40:02 pm
content: Hi!I thinking about to make a ICSP programmer for eeproms like 24/25/93xx series.Is there a diy schematics maybe what I don't found after two days of searching on the net?Or, a better way would be if I could mod my MiniPro TL866CS programmer touse it for in-circuit r/w of eeproms.That would be the best think for me.Is something possible to do?Thanks in advance.

author: amyk
author_rank: Super Contributor
timestamp: May 11, 2018, 01:56:13 am
content: Schematic? What do you expect to be on the other side? Serial EEPROMs don't need much in the way of wiring, and can be programmed with something as simple as a parallel port and a few wires...

author: BradC
author_rank: Super Contributor
timestamp: May 11, 2018, 02:03:45 am
content: Quote from: Chriss on May 10, 2018, 08:40:02 pmIt's often difficult. In powering up the EEPROM to talk to it you often power the associated circuits that drive it which then interfere. If you isolate the power pin, it's not unheard of to get significant loading on the data pins due to clamping diodes in the chip that normally talks to the EEPROM.I did a couple recently where I raised the VCC leg on the flash and used a home-brewed programmer with significant drive potential to wiggle the data pins, and that worked. In hindsight it would have been faster and easier to just pop the chip and write it out of circuit.

author: Chriss
author_rank: Frequent Contributor
timestamp: May 11, 2018, 08:37:33 am
content: I know, the best solution is to pop out the ic and put it in a programmer, that method I use the last 20 years.But I saw several programmer who can do In-Circuit programming of eeproms and I tough there is a way to makesome mod to my existing programmer or to make a simple I.C. programmer so I don't have to pop out the eep.I was thinking in the meaner of today's modern technology ad maybe there is a possibility, that is why I asked...I know about the major problems of I.C. programming, but I had a hope to figure out something simple and nice.

author: NorthGuy
author_rank: Super Contributor
timestamp: May 11, 2018, 01:39:07 pm
content: If your EEPROM is connected to an MCU, the MCU is most likely programmable in-circuit. Then the best way is to program your EEPROM through the MCU.I have a tankless water heater. They distribute their firmware in a small PCB with a flash chip. If you do this, you always can take your EEPROM out for re-programming and replacement.
Bitcloud / WSN - Endnodes did not rejoin after router was down by weak battery  - Page 1
Forum section: electronics / general

author: ldpee
author_rank: Newbie
timestamp: May 13, 2018, 04:59:41 pm
content: I'm running ZigBee Atmel Bitcloud 1.12 WSNDemo. Nodes are based on ATmega128RFA1 ... all on battery.The end-nodes connected by the router seems to be unable (sometimes) to rejoin the network after the router was down by low battery. Btw. the watchdog is not in use due to the extended power-save period of 20secs. My sniffer confirms there is no wireless transmission from the end-nodes to the router. Connectivity of the batteries to the PCB is OK as far as I can tell by a simple voltage measurement.One of the end-nodes connected to the Router has an indicator LED. Usually the LED blinks during each wake-up period. If the connection is lost the LED does not blink anymore. A power cycle of the end node fixes the issue and the devices immediately joins the Router/Network.I'm looking for any idea how to identify the root cause.

author: ataradov
author_rank: Super Contributor
timestamp: May 13, 2018, 05:34:25 pm
content: QuoteThat's your root cause. With versions that old you are lucky it all works at all. There were so many critical bugs fixed since than that it would be hard to identify which once affects things here.It may also be an application bug. If it were ARM, you could just attach to running target and see what exactly is going on. With AVR the only real thing you have is logging.

author: ldpee
author_rank: Newbie
timestamp: May 13, 2018, 10:17:06 pm
content: OK ... will Bitcloud 1.14 be significantly better? It seems Rev 3.x does not support ATmega128RFA1.

author: ataradov
author_rank: Super Contributor
timestamp: May 13, 2018, 10:21:48 pm
content: Hard to tell. You would probably need to reproduce the issue and debug it a bit more. It may be some application issue.
Probably Stupid Question, How To Enter "ip_addr_t *addr"? - Page 1
Forum section: electronics / general

author: The Doktor
author_rank: Regular Contributor
timestamp: May 08, 2018, 02:04:52 am
content: I'm trying to use the SNTP client in an esp8266 with the Arduino IDE. Having some trouble, no doubt caused by misunderstanding.#include<sntp.h> //worksunder setupsntp_set_timezone(-5); //workssntp_setserver(u8_t index, ip_addr_t *addr) //this I can't figure outI found these functions in Kolban's esp8266 book. I'm no programmer by any measure, but usually beat my way through any problems by means of persistence, google, and wine(not the Linux kind)The 1st parameter is the servers index, no problem here it accepts 0, 1, or 2. The address has me stumped. I'm trying to use my local NTP server, located at 192.168.0.105 and accessed by several devices on my LAN. I can't figure out how to enter that address. I've tried:192.168.0.105(error: too many decimal points in number)"192.168.0.105" (error: cannot convert 'const char*' to 'ip_addr_t* {aka ip4_addr*}' for argument '2' to 'void sntp_setserver(unsigned char, ip_addr_t*)')192,168,0,105 (error: too many arguments to function 'void sntp_setserver(unsigned char, ip_addr_t*)')"192,168,0,105"(error: cannot convert 'const char*' to 'ip_addr_t* {aka ip4_addr*}' for argument '2' to 'void sntp_setserver(unsigned char, ip_addr_t*)')I can't think of any other way to express that address. What am I doing wrong?

author: ataradov
author_rank: Super Contributor
timestamp: May 08, 2018, 02:31:27 am
content: Code:ip_addr_t addr;// Initialize addr according to whatever it issntp_setserver(0, &addr);You need to lookup whatever ip_addr_t is and setup fields accordingly (assuming it is a structure).And if this code is based on LwIP, then initialization will look like thisCode:IP4_ADDR(&addr, 192,168,0,105);

author: westfw
author_rank: Super Contributor
timestamp: May 08, 2018, 02:43:38 am
content: It looks like ip_addr_t is defined in tools/sdk/lwip2/include/lwip/ip_addr.h, along with macros to initialize it.perhaps something likeCode:ip_addr_t remote_ip = IPADDR4_INIT_BYTES(192, 168, 0, 105);sntp_setserver(index, &remote_ip);Since ip_add_t is a relatively complex structure (handles IPv6 and IPv4 as a union, for instance), I don't think you'll be able to use a literal constant in the function call...
STM32 vectors in assembly, how to generate with lsb set! FIXED TY :) - Page 1
Forum section: electronics / general

author: fourtytwo42
author_rank: Super Contributor
timestamp: May 04, 2018, 06:29:55 pm
content: Hi I am using an STM32F3xxxxx (Cortex M3) in assembler! Just wrote my first interrupt code and got "hard fault". Traced this to me being extremely naughty and loading the interrupt vector as usual with the ISR address BUT ARM objects if this is EVEN (something to do with thumb) apparently all ISR's must start on an odd address to avoid this. I have searched high and low and have found no way of ensuring this alignment. Does anybody know the appropriate incantations to be included in order to solve this problem ?

author: andersm
author_rank: Super Contributor
timestamp: May 04, 2018, 06:36:09 pm
content: As long as you assemble your code as Thumb (-mthumb for gas), the toolchain should handle this automatically.

author: fourtytwo42
author_rank: Super Contributor
timestamp: May 04, 2018, 06:44:31 pm
content: Thank you for your replyThere are only two modules, one containing the vector table and the other the isr, both have these lines at the beginning@ compiler switches.syntax unified.cpu cortex-m4.thumbI am not sure whats in the makefile where gcc is called up, I will go check itCouldnt find it BUT the log shows gcc being called with -mthumb. I am worried this is being overriden in the linker with all the ALIGN=4 stuff ?I am using openstm32

author: andersm
author_rank: Super Contributor
timestamp: May 04, 2018, 07:11:47 pm
content: Seems you need to explicitly mark symbols as functions using either the.thumb_funcor.type symname, %functiondirectives.

author: fourtytwo42
author_rank: Super Contributor
timestamp: May 04, 2018, 07:15:36 pm
content: Ahh like " .type Reset_Handler, %function"Thank you so much for shining a light on itI am still wading my way through the morass........PerfectJust been in Linux to test, has to be immediatly before label not just anywhere it seems as in.type tim16_int, %functiontim16_int:
Tutorial or information regarding DDR2 PHY on Max 10 FPGA - Page 1
Forum section: electronics / general

author: Boscoe
author_rank: Frequent Contributor
timestamp: May 01, 2018, 09:43:14 pm
content: Hi all,I'm thinking of buying the following dev kit for the DDR" memory:https://www.altera.com/products/boards_and_kits/dev-kits/altera/kit-max-10m50-evaluation.htmlI can;t find any example projects for this dev kit or any information regarding configuring the LPDDR2 on board. The SOPC builder for the PHY in Quartus is pretty scary. Does anyone have any nice accessible docs or websites for such a thing?ThanksBoscoe

author: Scrts
author_rank: Frequent Contributor
timestamp: May 03, 2018, 03:04:53 am
content: This one should help:https://cloud.altera.com/devstore/platform/16.0.0/Standard/mipi-csi2-rxtx-with-passive-d-phy/
Need Model linker script.gld for Bootloader and Application for PIC24FJ128GB206 - Page 1
Forum section: electronics / general

author: muthukural001
author_rank: Regular Contributor
timestamp: May 01, 2018, 08:57:31 am
content: Hello All,I am going to develop Bootloader for PIC24FJ128GB206.I read AN1157 and some posts in the same forum to get understanding on bootloader. What I understood is BL script owns the Real IVT and APP script will generate new IVT table in its space. So,the Real IVT points to APP_IVT which has the address of the ISR.Though, I have some confusion in understanding about Reset Vector:Well, let's assume my Boot loader start at:data (a!xr) : ORIGIN = 0x0800, LENGTH = 0x18000reset : ORIGIN = 0x0000, LENGTH = 0x4ivt : ORIGIN = 0x0004, LENGTH = 0xFCaivt : ORIGIN = 0x0104, LENGTH = 0xFCprogram (xr) :ORIGIN = 0x400, LENGTH = 0x1000 /*Boot loader starts */Application starts at:data (a!xr) : ORIGIN = 0x0800, LENGTH = 0x18000reset : ORIGIN = 0x0000, LENGTH = 0x4ivt : ORIGIN = 0x0004, LENGTH = 0xFCaivt : ORIGIN = 0x0104, LENGTH = 0xFCapp_ivt : ORIGIN = 0x1402, LENGTH = 0x01FCprogram (xr) : ORIGIN = 0x1602, LENGTH = 0x141F6 /* User code starts */Q1:After every device reset,bootloader has to be called first. For this, the device's hardware Reset vector(addresses 000000h and 000002h) should have starting address of Bootloader (0x400). Am I right?. But I don't see that this is mapped in both program and script.Q2: After successful bootloader operation or boot timeout, it must call user application. In the Bootloader program, they defined constant "USER_PROG_RESET"(0x100) which tells where the Reset vector is mapped. Though, in the App linker script, they explictely declared like below in the MEMORY section:BLreset : ORIGIN = 0x100, LENGTH = 0x4.BLreset :{(.BLreset);} >BLresetQ3: Some BL script files that I have seen have Boottimeout like below:/*** Boot loader timeout value.** Entered in seconds*/.boottimeout :{SHORT(0x05); /* Bootloader timeout in sec */SHORT(0x00);} >boottimeoutQuestion is that Boot.c set Bootdelay to 2 seconds.Then why they are using like above.I really need some support.Please suggest.Thanks,Muthu
PIC24F serial bootloader-P24QP "Run time error 53" - Page 1
Forum section: electronics / general

author: muthukural001
author_rank: Regular Contributor
timestamp: May 05, 2018, 03:41:34 pm
content: Hello All,I am developing UART bootloader for PIC24FJ128GB206. I loaded bootloader code using pickit3. Then, I used P24QP serial programmer software application to load Applicatio program. Doing this, I was able to detect my MCU device id. But, when I try to write Application hex, I am getting "Run time error '53 '" and "File not found".I don't know where to debug. It would be greatful if anyone suggest.Thanks,Muthu

author: Howardlong
author_rank: Super Contributor
timestamp: May 05, 2018, 08:37:40 pm
content: Quote from: muthukural001 on May 05, 2018, 03:41:34 pm53 sounds like a raw doserror at your PC, rather than a debugger/programmer error.ERROR_BAD_NETPATH53 (0x35)The network path was not found.
Question about the Lattice ICE40 MAC16 DSP cell - Page 1
Forum section: electronics / general

author: hotwolf
author_rank: Newbie
timestamp: April 27, 2018, 06:45:39 pm
content: Hello,I'm planning to do a hobby project using a Lattice ICE40 UltraPlus FPGA. As I was reading through the documentation, I've noticed some odd logic in the block diagram of the MAC16 hard macro (pls. see attachment). The sum of the intermediate 8x8 products seems wrong when doing a 16 bit multiplication.In my understanding the DSP cell should implement the following logic:A[15:0] * B[15:0] =((A[15:8] * 0x100) + A[7:0]) * ((B[15:8] * 0x100) + B[7:0]) =(A[15:8] * B[15:8] * 0x10000) + (A[7:0] * B[15:8] * 0x100) + (A[15:8] * B[7:0] * 0x100) + (A[7:0] * B[7:0]) =(F[15:0] * 0x10000) + (J[15:0] * 0x100) + (K[15:0] * 0x100) + G[15:0] =(F[15:8] * 0x1000000) + ([F[7:0] + J[15:8] + K[15:8]) * 0x10000) + ((J[7:0] + K[7:0] + G[15:8]) * 0x100) + G[7:0]However the block diagram suggests the following design implementation:([F[7:0] + J[15:8]) * 0x1000000) + ((J[7:0] + K[15:8]) * 0x10000) + ((K[7:0] + G[15:8]) * 0x100) + G[7:0]So I'm wondering, whetherthis is a documentation problemthe design is brokenmy math is wrongIs there anybody with hand-on experience on ICE40 FPGAs, who can confirm that the MAC16 cells do perform correct 16 bit multiplications?Thanks,Dirk

author: daveshah
author_rank: Unknown
timestamp: April 27, 2018, 09:13:23 pm
content: I can confirm they function correctly in 16x16 mode. That diagram looks like a bit of a mess in terms of the adders after the multipliers. If you are curious, inside the simulation models in Radiant there are detailed verilog models for all parts of the MAC16.

author: hotwolf
author_rank: Newbie
timestamp: April 28, 2018, 08:16:24 am
content: Thanks for the confirmation. That is good to know.I'll try to find the Verilog models.Dirk

author: iMo
author_rank: Super Contributor
timestamp: April 29, 2018, 04:55:37 am
content: The IceCube2 and Radiant infer 16x16mult into the DSP module. I took the module's (SB_MAC16) wiring from there and put into IceStorm version of my design, works straight.For example, outpC = inpA x inpB (unsigned):Code:SB_MAC16 my_16x16_mult (.A(inpA),.B(inpB),.C(16'h0000),.D(16'h0000),.O(outpC),.CLK(0),.CE(1),.IRSTTOP(0),.IRSTBOT(0),.ORSTTOP(0),.ORSTBOT(0),.AHOLD(1),.BHOLD(1),.CHOLD(0),.DHOLD(0),.OHOLDTOP(0),.OHOLDBOT(0),.OLOADTOP(0),.OLOADBOT(0),.ADDSUBTOP(0),.ADDSUBBOT(0),.CO(),.CI(0),// MAC cascading ports.ACCUMCI(),.ACCUMCO(),.SIGNEXTIN(0),.SIGNEXTOUT() );defparam my_16x16_mult.B_SIGNED = 1'b0 ;defparam my_16x16_mult.A_SIGNED = 1'b0 ;defparam my_16x16_mult.BOTOUTPUT_SELECT = 2'b11 ;defparam my_16x16_mult.TOPOUTPUT_SELECT = 2'b11 ;
How to start to write UART bootloader for PIC24FJ128GB206 - Page 1
Forum section: electronics / general

author: muthukural001
author_rank: Regular Contributor
timestamp: April 27, 2018, 12:42:50 pm
content: Hello All,I have a project which occupied 82% of flash memory. Right now, I have to write UART bootloader for this. As I did not work with any Bootloader reviously, I really need some help to start. Please suggest.Regards,muthu

author: mikerj
author_rank: Super Contributor
timestamp: April 27, 2018, 01:21:03 pm
content: Have you looked at MicrochipsAN1157app note? There is also theEasy Bootloaderlibrary with examples.

author: muthukural001
author_rank: Regular Contributor
timestamp: April 27, 2018, 06:06:06 pm
content: Hi,Thanks. I downloaded and tried to run the ex_boot_uart MPLAB X project from the "ezbl" zip with the change of target device to PIC24FJ128GB206 by make use of project properities. But, I am getting error as shown in the attached. Then, I saw a folder named "Hardware Initializers" which have .c files for specific PIC24 and dspic microcontrollers.If I change target device to one of the microcntrollers that is in the folder and compile, I am able to compile successfully.Unfortunately, Our microcontroller is not listed there. How to get rid of this problem. Please suggest.
Generate DVI-D Dual-Link signal with FPGA? - Page 1
Forum section: electronics / general

author: davorin
author_rank: Unknown
timestamp: April 26, 2018, 11:55:30 am
content: EHLO (o;As it is easy possible to generate 1080p60 TMDS signals I looked around for the DVI-D dual link timing specs if it is feasible to generate 2560x1440 with 6 TMDS channels with FPGA...According some text I found the pixel rate is around 240MHz compared to 165MHz at 1080p.I thought that DVI-D dual link can use the same pixel clock but spreads odd/even pixels across each bundle of 3 TMDS links?

author: hamster_nz
author_rank: Super Contributor
timestamp: April 26, 2018, 07:11:17 pm
content: Yes it is possible.I thought that each link controlled half the screen (left and right), but might be mistaken. Look for the Digital Display Working Group (DDWG) documents on the web to be sure.

author: hamster_nz
author_rank: Super Contributor
timestamp: April 26, 2018, 08:57:38 pm
content: Quote from: hamster_nz on April 26, 2018, 07:11:17 pmI was wrong the pixels are interleaved - have a look at "Channel Mapping" on page 26 ofhttp://www.cs.unc.edu/~stc/FAQs/Video/dvi_spec-V1_0.pdf

author: davorin
author_rank: Unknown
timestamp: April 26, 2018, 09:33:54 pm
content: Thanks Mike for tbe pointer :-)Seems you are the Guru everything FPGA display related ;-)Do you know anything regarding eDP displays with lower resolution (< 1920x1080) ?Do they always require a GTP or would be a OSERDES enough with an Artix 7 as the pixel rate is around 1.5Gbits/secs?BTW: I am almost through converting your brilliant hdmi processing design to verilog, which will be the basic for my hdmi2rgb matrix panel project, though currently limited to 192x128 resolution ;-)

author: hamster_nz
author_rank: Super Contributor
timestamp: April 26, 2018, 10:45:25 pm
content: I don't know if eDP allows a lower speed option, but DisplayPort uses fixed data rates, and then only uses the data slots it needs to send pixels. Even 640x800 is sent using a high speed link.The rates are fixed at 1.62Gb/s, 2.7Gb/s and 5.4Gb/s - all outside of the rates achievable with standard SERDES pins, even if they were electrically compatible.Unlike HDMI, because it uses Clock Data Recovery I expect you will not be able to establish a valid link if you try to stray more than a few % from these speeds - the receiver's PLL will not be able to lock successfully.

author: asmi
author_rank: Super Contributor
timestamp: April 27, 2018, 12:57:41 am
content: Quote from: davorin on April 26, 2018, 09:33:54 pmMGTs are required for DP. You can also implement HDMI 2.0 with MGTs using retimer SN65DP159 (I saw this idea in the schematic of ZCU104 devboard).
I have cloned the Analog Devices USBi device. - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: April 25, 2018, 06:59:37 pm
content: That is the debug device intended for SigmaDSP. From Taobao the prices costs me an arm and a leg to buy even one, be it an ADI original or an existing Chinese clone - it actually cost me less to build 10 of them than buying one, so I cloned it. I intend to use it in my DSP enhanced Bluetooth headphone receiver project, as the debug probe building the ADAU1761 DSP program.My clone is mostly faithful to the ADI original circuit as published in the application notes, albeit still replaced the CY7C68053 device with a cheaper and hand solderable CY7C68013. I also added a write protect jumper to combat the common beginner mistake of erasing the EEPROM contents of the USBi itself - without the jumper installed the onboard AT24C64 device is write protected. Since I have the say about the physical layout of the PCB, I managed to fit it into one of those "miniature ULink" style debug probe project boxes, so it is not a bare PCB like the ADI original or freeDSP's freeUSBi.As of the firmware, Analog kindly left a CyScript file in the SigmaStudio installation folder. That file is reverse engineered into a EEPROM image. I did not manage to produce the CyConsole file for in-system flashing the EEPROM, but the EEPROM image can be loaded using a MiniPro programmer to the I2C EEPROM chip before being soldered onto the PCB.I am wondering if I can, or should, sell this.
16f1825 MCC i2c with PCA985 - Page 1
Forum section: electronics / general

author: JonPyro
author_rank: Regular Contributor
timestamp: April 25, 2018, 01:49:23 pm
content: Hi All,I am a little lost as I have never really implemented I2C before on a PIC with MCC.I am trying to talk to the PCA9685 (datasheet :https://www.nxp.com/docs/en/data-sheet/PCA9685.pdf) on a servo driver board bought off ebay using a 16f1825 and using MCC to generate the I2C functions. However, I am at a loss to work out how to use the functions MCC has generated.Here is my thinking, first define the registers from the datasheet I want to access and the new pre-scaler (I want 50hz pwm for servos and not the default 200hz):Code:#define PCA9685_ADDRESS 0x40#define PCA9685_MODE1 0x00#define PCA9685_PRESCALE 0xFE#define PCA9685_MODE1_SLEEP 0x10#define PCA8695_MODE1_RESTART 0x80int PreScaleValue = 0x79;Now in the main program I should be using:Code:void I2C_MasterWrite(uint8_t *pdata,uint8_t length,uint16_t address,I2C_MESSAGE_STATUS *pstatus);So would you write that something along the lines of this if I wanted to sleep the chip and change the pre-scale:Code:writeBuffer = PCA9685_MODE1_SLEEP;writeBuffer = PCA9685_PRESCALE;writeBuffer = PreScaleValue;I2C_MasterWrite(writeBuffer,1, PCA9685_ADDRESS, &status);Any help would be appreciated
HELP! How fast can the TMS320C6678 DSP run? - Page 1
Forum section: electronics / general

author: gamalot
author_rank: Super Contributor
timestamp: April 25, 2018, 11:26:08 am
content: I was confused by the description of TMS320C6678, what's the meaning of 'enabling up to 10 GHz'? Does it mean 1.25Ghz times 8 is equal to 10GHz?Quotehttp://www.ti.com/product/TMS320C6678

author: hamster_nz
author_rank: Super Contributor
timestamp: April 25, 2018, 11:56:54 am
content: It seems like each of the C66x cores can perform 16 floating point operations per cycle. So with 8 cores at 1.25GHz it can do 160 GFLOPS.I imagine it would be very painful to code to that level of performance!
Transistor count of modern FPGA - Page 1
Forum section: electronics / general

author: NiHaoMike
author_rank: Super Contributor
timestamp: April 20, 2018, 07:21:43 am
content: Roughly how many transistors are there in a logic cell of a modern Xilinx FPGA like an Artix 7?

author: KrudyZ
author_rank: Frequent Contributor
timestamp: April 20, 2018, 07:34:17 am
content: The Virtex 7 2000T has 6.8 billion transistors.A mid size Artix will be a about 100 million.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 20, 2018, 08:20:42 am
content: Yes, the Virtex-7 2000T is said to have 6.8 billion transistors for 2 million logic cells, which would equate to 3400 transistors per logic cell.Since the Artix-7 is based on the same architecture, it's probably in the same ballpark.

author: nomadd
author_rank: Contributor
timestamp: April 24, 2018, 07:49:54 am
content: Quote from: NiHaoMike on April 20, 2018, 07:21:43 amOr go with Intel, who are shooting for the stars with their new30 billiontransistor (!) Stratix 10.

author: dmills
author_rank: Super Contributor
timestamp: April 24, 2018, 12:31:49 pm
content: Note that a LOT of those transistors are not in the LUTs and FFs but in the routing fabric, there are a lot of fixed at bitstream load time multiplexers involved in routing, and things like the DSP and BRAM cores are not exactly cheap transistor wise either (But much cheaper then building the same things out of generic LUTS and FFs!).Only a fairly small percentage of the silicon goes on LUTs and user flipflops, most of it is routing and whatever special purpose blocks are appropriate.Regards, Dan.
RTS & CTS support for ATSAMD based boards  - Page 1
Forum section: electronics / general

author: madhu.wesly01
author_rank: Regular Contributor
timestamp: April 27, 2018, 04:18:55 am
content: Hi,1. Does ATSAMD21G support RTS and CTS (Full UART ) ?2. If yes, how do I add/enable these pins in a SERCOM of the microcontroller core files (probably variant.cpp)?Any pointers with reference to Arduino Zero core would be very helpful.

author: ataradov
author_rank: Super Contributor
timestamp: April 27, 2018, 04:08:38 pm
content: 1. Yes, it does.2. It depends on whatever library you are using. Full UART is enabled when TXPO=2 and RXPO=1. And you are accordingly limited in pins selection. Read the datasheet for details.
How to Rotate Stepper Motor in Single step in CW and CCW - Page 1
Forum section: electronics / general

author: muthukural001
author_rank: Regular Contributor
timestamp: April 19, 2018, 05:21:27 am
content: Hello,Doing a project with Two LDRs which detect light and Solar panel which will be moved to the side of LDR which have More light.I have Stepper Motor that configured in Bipolar mode and having step angle of 7.5 degree.To rotate the Motor in any one of the LDR direction, the difference between LDR1 and LDR2 should be above 300 Ohms (LDR Resistance decrease as light increases).That Means, if LDR1's resistance less than LDR2's resistance and the difference is above 300 Ohms, Move stepper motor one step in Clockwise direction.If LDR2's resistance less than LDR1's resistance and the difference is above 300 Ohms, Move stepper motor one step in Counter Clockwise direction.I do compare LDR1 and LDR2 value after completing single step either in CW and CCW.My Stepper Motor code:0x080x040x020x01looping the above code for 12 times will give one revolution. 4x7.5 = 30 degree for one iteration So 12x30 = 360 degree.But I don't know how to use it single step.. Please suggest

author: rstofer
author_rank: Super Contributor
timestamp: April 19, 2018, 02:44:16 pm
content: I don't think I quite understand your 'code', it looks like some kind of bit pattern. It would seem to me that each transition in the pattern is one step. Each transition (0x08 to 0x04, for example) should rotate the motor 7.5 degrees. I guess...I have never seen a motor that is wired that way. Not that they don't exist, I just haven't seen one.How about providing a little more info? Are you using a microcontroller? Are you using a driver chip (which)? Perhaps a schematic? What kind of electronics makes the 300 ohm measurement? I haven't thought much about it but that seems hard.

author: muthukural001
author_rank: Regular Contributor
timestamp: April 23, 2018, 07:07:32 am
content: Hi rstofer,Thanks. I managed to get work it. Actually, 360 degree divided by 7.5 degree is 48.It means that we have to apply 48 pulses to get one revolution. I wrote code like below for Clockwise and Counter Clock Wise.Code:#define TOTAL_STEPS 4#define STEP_MASK (TOTAL_STEPS - 1)static uint8_t Cw_Steps = {0x08,0x04,0x02,0x01};static uint8_t CCw_Steps = {0x01,0x02,0x04,0x08};uint8_t CW_Step = 0, CCW_Step = 0;/*--------------------STEP CLCOKWISE--------------------------------*/void SingleStep_ClockWise(void){LATD &= 0xF0;LATD |= Cw_Steps[CW_Step & STEP_MASK];CW_Step++;Start_Timer();while(!One_Step_Complete);Stop_Timer();}/*--------------------STEP CLCOKWISE--------------------------------*/void SingleStep_CClockWise(void){LATD &= 0xF0;LATD |= CCw_Steps[CCW_Step & STEP_MASK];CCW_Step++;Start_Timer();while(!One_Step_Complete);Stop_Timer();}Set timer to 333ms to get rpm of 4.Thanks,Muthu
Can anyone share HX711 c driver code - Page 1
Forum section: electronics / general

author: muthukural001
author_rank: Regular Contributor
timestamp: April 23, 2018, 07:24:41 am
content: Hello All,I am using HX711 as part of the project. For I know, it is not based on neither I2C nor SPI. All the sample codes are available in Arduino. If anyone had worked with HX711, can you share the sample code ?Thanks,Muthu

author: agehall
author_rank: Frequent Contributor
timestamp: April 23, 2018, 08:05:55 am
content: For what platform? If Arduino is not good enough, you need to specify what you want.Most people would simply read the Arduino code to understand how to use it if the datasheet doesn't tell you and then adopt the code to whatever platform you are using. Arduino code is no magic, it is pretty much standard C/C++ code.

author: muthukural001
author_rank: Regular Contributor
timestamp: April 23, 2018, 09:02:55 am
content: Sorry for not Mentioning. I need it in C language. Well, Arduino code for HX711 looks standard library and I don't know and can't find what is inside.

author: daveshah
author_rank: Unknown
timestamp: April 23, 2018, 09:11:46 am
content: There seems to be reference C code in the datasheet on page 8.https://www.mouser.com/ds/2/813/hx711_english-1022875.pdf

author: westfw
author_rank: Super Contributor
timestamp: April 23, 2018, 09:34:56 am
content: You don't find this understandable?https://github.com/aguegu/ardulibs/blob/master/hx711/hx711.cpp
PIC18F4620 LED BLINKING WORKING IN DEBUGGING BUT NOT AFTER FLASHING - Page 1
Forum section: electronics / general

author: muthukural001
author_rank: Regular Contributor
timestamp: April 17, 2018, 09:59:19 pm
content: Hello All,Just to ensure that Microcontroller is working fine, I am trying to blink LED . Blinking is happening in Debug mode but After flashing the code nothing coming.Please suggest..Regards,'Muthu

author: Ian.M
author_rank: Super Contributor
timestamp: April 18, 2018, 01:02:50 am
content: IIRC the debug executive on older PIC18 parts sets the whole of Port B to digital mode. If your LED is on a Port B pin and you aren't using the LATB register to flash it, that's probably the difference. Otherwise, as IonizedGears suggests, totally disconnect the programmer after flashing your release build, and add a 10K pullup resistor from /MCLR to Vdd.

author: zzattack
author_rank: Regular Contributor
timestamp: April 18, 2018, 10:32:52 am
content: Better upload some code/schematics. Likely issue is floating VPP in combination with MCLR config bit set.

author: muthukural001
author_rank: Regular Contributor
timestamp: April 19, 2018, 04:54:23 am
content: Hello All,Thanks. The problem was not pulling up MCLR pin to VCC. After did this, I was able to flash My MCU.Thanks,Muthu