hybridfree/eevblog-posts huggingface dataset:
STM32F7 problem with MCO2 output derived from PLLI2SR - Page 1
Forum section: electronics / general

author: prasimix
author_rank: Unknown
timestamp: September 25, 2018, 04:10:04 pm
content: I found that MCO2 output when derived from PLLI2SR doesn't work on STM32F769IGT6. I've selected as HSE input 10 MHz xtal that is running fine and using the following clock configuration (.ioc can be found in attachment):Why is that? I didn't find so far that PLLI2SR cannot be used as a source, neither CubeMX report any error or warning. I'd like to use 25 MHz as clock for Ethernet PHY instead of deploying additional xtal/xco. Thanks in advance for your comments.

author: MT
author_rank: Super Contributor
timestamp: September 25, 2018, 08:13:12 pm
content: Have you tried "direct register writes" to setup GPIO and muxes to enable MCO as to absolutely sure the setup is valid.(checking with you tools that register bits are really set or not).

author: prasimix
author_rank: Unknown
timestamp: September 26, 2018, 02:37:47 pm
content: I've checked code which CubeMX generated and it seems that is in line with description in STM32F7 datasheet (RM0410 Reference manual, en.DM00224583). But, something else catches my attention and that is message what appears when hovering over disabled PLLI2SR combo box (see picture below), which says that SAI or DFSDM have to be enabled. Maybe it's simply not possible to use PLLI2SR as I presumed.
PIC18F57K42 - MPLAB X IDE  - Page 1
Forum section: electronics / general

author: arul
author_rank: Regular Contributor
timestamp: September 30, 2018, 03:13:03 pm
content: I am going to develop the firmware for PIC18F57K42 microcontroller. But in the MPLAB X IDE, under "family", It does not show the PIC18F57K42 device. Please suggest MPLAB X IDE v3.51

author: Ferenc
author_rank: Newbie
timestamp: September 30, 2018, 05:25:02 pm
content: I have that device in v5.05. Your version is probably too old.

author: arul
author_rank: Regular Contributor
timestamp: September 30, 2018, 06:38:36 pm
content: Thanks Ferenc...I will check and update my IDE...If any possible can i get that device in my version v3.51

author: JPortici
author_rank: Super Contributor
timestamp: September 30, 2018, 07:00:28 pm
content: It may be possible. What version of XC8 do you have?It has to be 1.42 or newer to support for the K42 and K83 series (which has a new interrupt controller and need a new syntax for the interrupt routines)
Makefile vs ISE? - Page 1
Forum section: electronics / general

author: Pack34
author_rank: Frequent Contributor
timestamp: September 25, 2018, 05:12:21 pm
content: What are the benefits to using a makefile to compile some HDL versus just using the IDE? Is it just faster or are there additional benefits to a more manual method?

author: ataradov
author_rank: Super Contributor
timestamp: September 25, 2018, 06:23:58 pm
content: It is not going to be faster, but you will have more control over the process. Plus Makefiles are easier to track through the source control system.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 25, 2018, 07:28:26 pm
content: Other benefits include automated builds and the possibility of adding any extra steps during build, for instance the execution of test benches.

author: ejeffrey
author_rank: Super Contributor
timestamp: September 25, 2018, 09:04:36 pm
content: Faster or slower is entirely a question of which does a better job of correctly computing the needed recompilations and extracting the maximum parallelism. Makefiles are frequently not very good at this. Either triggering unnecessary compilation steps or missing implicit dependencies that require the occasional "make clean." If the dependency graph is poor enough that developers learn to "always make clean" then you have pretty much eliminated the entire purpose of make and could just use a shells script. IDEs can be bad at this too, but are probably better than most hand built Makefiles.

author: ataradov
author_rank: Super Contributor
timestamp: September 25, 2018, 09:06:49 pm
content: For ISE this is not a factor at all. Even if there is incremental synthesis, it is managed by ISE itself.

author: NorthGuy
author_rank: Super Contributor
timestamp: September 25, 2018, 09:54:48 pm
content: I guess this is IDE not ISE.That's a question of preference. IDEs have lots of useful features, but also lots of "in your face" features. The speed difference is negligible unless your IDE is horribly slow.

author: ataradov
author_rank: Super Contributor
timestamp: September 25, 2018, 09:56:40 pm
content: In combination with HDL, I would guess it is ISE (Xilinx).

author: legacy
author_rank: Super Contributor
timestamp: September 25, 2018, 10:35:57 pm
content: ISE + ModelSim is an example of a scripting environment
MikroC I2C problem - Page 1
Forum section: electronics / general

author: khatus
author_rank: Regular Contributor
timestamp: September 25, 2018, 01:00:41 pm
content: Hello guys i can't understand some line in mikroC i2c manual.QuoteCan anyone explain the above line??

author: JPortici
author_rank: Super Contributor
timestamp: September 25, 2018, 02:22:07 pm
content: it should be self-explanatory but sure..as also noted in the manual the I2C baud rate depends mostly on 2 variables- MCU clock frequency (Fosc)- Content of the baud rate generator register (BRG)so basically baud rate = Fosc/BRGSince in most MCU projects Fosc is fixed (or maybe one frequency during operation and one in sleep mode) the compiler can calculate the value of BRG at compile time, instead letting the MCU performing divisions -which takes very long to perform if you don't have a hardware division accelerator-so, the function expects a constant and the compiler will throw an error if a variable is passed to the function.

author: khatus
author_rank: Regular Contributor
timestamp: September 25, 2018, 02:30:49 pm
content: Thanks

author: khatus
author_rank: Regular Contributor
timestamp: September 25, 2018, 02:34:16 pm
content: The value inside the function I2C1_Init(100000); should always be 100000?? Can i use different value??

author: JPortici
author_rank: Super Contributor
timestamp: September 25, 2018, 03:36:08 pm
content: Of course you canpassing it 100000 will set up the peripheral for 100kHz operation, 400000 for example would set it for 400khz

author: khatus
author_rank: Regular Contributor
timestamp: September 25, 2018, 03:58:29 pm
content: In the above picture it says if Both SCL and SDA are connected to a positive power supply voltage via resistors. This means that when the bus is free, both lines are high.My question is1. if i connect a slave device to SDA and SCL line does the slave pulled the lines(SDA & SCL) to low??2. TheI2C1_Start()command in mikroc compiler determines if I²C bus is free or not what does it mean by free???3. What is the use ofI2C1_Repeated_Start() routine??I can't understand what it mean by repeated START signal?? why it is required ??

author: ataradov
author_rank: Super Contributor
timestamp: September 25, 2018, 04:21:59 pm
content: All your questions are answered in I2C specification.1. To communicate 0 or 1 all devices on the bus can either drive the bus low, or let go of the bus, which will make it go high.2. I2C protocol has a state machine that. When a master successfully issues a start condition, it owns the bus until it releases it though a stop condition. Between the start and stop conditions the bus is busy an no other master can issue a start condition.3. Repeated start is a start without prior stop. This may be necessary when you are reading a register and need to change write to read direction after you wrote the register address and want to read the data. Some devices don't tolerate a stop and a new start in this case.
FreeRTOS vs pthread - Page 1
Forum section: electronics / general

author: jtronix
author_rank: Regular Contributor
timestamp: September 25, 2018, 06:29:01 am
content: Hi,I have used FreeRTOS little bit in few of projects and now i want to step into IoT devices. I'd gone through many of the IoT hardware vendor and found that some of them are using pthread. I google it for pthread and seen example code but don't find any much difference. Infect Texas Instruments has use FreeRTOS on low level side for implement pthread on Top level.Can any one comment on below points1) what is the advance of using pthread?2) Can pthread use for Cortex-M series or low memory devices (between 128K - 512K)?3) How pthread differ from FreeRTOS?

author: Berni
author_rank: Super Contributor
timestamp: September 25, 2018, 06:39:57 am
content: The name pthread stands for POSIX Threads. It only works on Unix-like systems such as Linux. The pthread.h is just a API that interfaces to the built in threading features of the OS. The pthread library does not actually do any of the multithreading itself.That being said once a library becomes popular there are always people who want to use it elsewhere too (And its nice keeping things standardized and portable) so people will often write libraries that imitate the same API on there platform of choice.So in this case using pthread on a microcontroller requires some form of multitasking OS to be running underneath or write a version of the pthread library specific for that CPU that can do multithreading on its own. If you see both FreeRTOS and pthread used in the same project then pthread is likely just providing a standardized API to the FreeRTOS multitasking features.
General question on clock tree (STM32) - Page 1
Forum section: electronics / general

author: XaviPacheco
author_rank: Regular Contributor
timestamp: September 24, 2018, 03:28:35 pm
content: I've attached a fragment of the Nucleo L432 clock tree. At first insight I thought that Timer 2 (connected to APB2) were clocked at"APB2 Timer Clocks"frequency. But then I realized that I was wrong, and that timers peripheral are clocked at"APBx Peripheral Clocks"(makes sense). So, what's the purpose of APB2 Timer clocks?

author: Siwastaja
author_rank: Super Contributor
timestamp: September 24, 2018, 04:32:09 pm
content: Most STM32 devices seem to have this interesting concept of a seperate timer kernel clock that has an optional doubler, which is automatically enabled when you enable an upstream divider.The reference manual explains this in detail. The idea is, say your HCLK (AHB clock) is 80MHz, and you want to divide it by 2 to make your 40MHz PCLK2 (APB2 clock). Now, the timer will have separate interface clock, and the kernel clock which runs the counter - the kernel clock is derived by doubling the 40MHz clock, so the timer runs at 80MHz again.This doubler is automatically enabled and disabled based on the PCLK2 divider. The idea is, while the interface freq is limited, the timer can run higher, so they do this.For example, you might want to save power with lower interface clock. Now, you can change the bus prescaler on the fly, and the timer will still run at the same frequency (by switching the doubler in or out).Do check the details from the reference manual. For example, what is the basis of the x2 multiplier being enabled or not. It may be something else.

author: newbrain
author_rank: Super Contributor
timestamp: September 24, 2018, 06:09:47 pm
content: Quote from: XaviPacheco on September 24, 2018, 03:28:35 pmWhat Siwastaja said, plus:APBx is just a generic name for APB1 or APB2, used (sparingly) in the manuals when the description applies to both, or a register has two similar instances, one for each APB.A timer peripheral will be driven by either APB1 or APB2.But you are actually right, you were in fact wrong asTIM2is connected toAPB1according toFigure 1 in the datasheet

author: XaviPacheco
author_rank: Regular Contributor
timestamp: September 24, 2018, 06:32:43 pm
content: Quote from: newbrain on September 24, 2018, 06:09:47 pmAs I'm using TIM1 and TIM2 and they are connected to APB2 and APB1 respectively I confused myself when writing this post. At the end of the day my confusion was betweenAPBx Peripheral Clocks and APBx Timer Clocksin CubeMx Clock Tree.
Graphics on SSD1322 - Page 1
Forum section: electronics / general

author: radhika
author_rank: Regular Contributor
timestamp: September 19, 2018, 01:26:32 pm
content: Hello,I have been working on Project using SSD1322 driver for LPC1768. I have to create 3 music symbol in series as a graphics on it and which glow in 1 sec one after the other in OLED display. I am new to this and an student too. Please guide me how do I approach this logics using SSD1322 driver for LPC1768, or anybody have previous code which I can redefine and get certain path to work further.Thanks.

author: krish2487
author_rank: Frequent Contributor
timestamp: September 20, 2018, 07:50:06 am
content: Have a look at the Adafruit gfx library and lcd controller repos. They provide a good start and abstract most of th heavy lifting.You can check which the closest driver to your requirements , if you can't find the exact driver library, and work your way from there..
SPS program conversion - searching for a specialist - Page 1
Forum section: electronics / general

author: brabus
author_rank: Frequent Contributor
timestamp: September 19, 2018, 03:08:36 pm
content: Our Company developed a Siemens-based program in SCL language for a 3-axes machine with ~60 I/O.We need to translate it into KOP or AWL.Is there anyone willing to perform this Operation, obviously after monetary agreement?Thank you and Best Regards.
Microcontroller communication with USB Test Instruments - Page 1
Forum section: electronics / general

author: alexm271175
author_rank: Newbie
timestamp: September 17, 2018, 02:12:01 pm
content: Hi,has anyone ever tried to USB control a Test & Measurement Instrument (like a digital multimeter) using a microcontroller? Like set the measurement range, start a measurement, read the result...I think a FTDI VNC1L USB Host together with a microcontroller should do this (maybe also a STM32 microcontroller with built in USB), but I was lost about how to send a SCPI command to the instrument. I have some experience about how to write data using the VNC1L to a usb storage but can't find information about using the USB T&M class.alex

author: abraxa
author_rank: Frequent Contributor
timestamp: September 17, 2018, 07:52:19 pm
content: Does it have to be a microcontroller? With a raspberry pi or similar, you can have linux and with that, the usbtmc kernel driver and/or all kinds of userspace tools that can speak SCPI.

author: ejeffrey
author_rank: Super Contributor
timestamp: September 18, 2018, 05:02:42 pm
content: You can download and read the USBTMC standard, and eventually figure out what it means. There are also a lot of open source USBTMC drivers that you can refer to, such as the linux kernel driver and the python-usbtmc userspace driver. You used to be able to find the USBTMC definition on usb.org, but it seems to have been reorganized for maximum confusion since I last visited. Here is a copy someone posted:http://sdpha2.ucsd.edu/Lab_Equip_Manuals/USBTMC_1_00.pdfWhen you say "set the measurement range, start a measurement, read the result" -- those are higher level concepts than USBTMC, and are about sending device specific SCPI commands. USBTMC is concerned with sending messages, receiving responses, and executing control commands such as clearing the interface or aborting an in-progress transfer. USB488.2 includes equivalent behavior to IEEE 488.2 such as serial poll and SRQ to notify you of events such as a measurement completion but that is still lower level than the application level commands you are talking about.My suggestion is definitely to get things working on a PC first using libusb. Most of the higher level code should stay the same if you want to move to a microcontroller, you will just have to replace the libusb calls with your appropriate platform USB calls.
I got my PIC2MZ DA samples. Now what? - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: September 18, 2018, 03:28:38 am
content: Finally the PIC32MZ2064DA176 samples I ordered arrived today. What should I try first? Should I go straight for the fabled Linux support, putting the OS on a microSD card and hook a capacitive touchscreen directly to it?p.s. It might be economical to produce a version of those embedded DRAM PIC32MZ DA chips with a mask-programed u-boot and base device tree instead of Flash if people do intend to use it as a Linux processor. This way designers can just supply their own NAND, eMMC or microSD card, and go into the built-in u-boot to configure the boot options.

author: iMo
author_rank: Super Contributor
timestamp: September 18, 2018, 09:57:34 am
content: QuoteI'll cross my fingers for you. You will be the first one who done it, it seems.

author: technix
author_rank: Super Contributor
timestamp: September 18, 2018, 10:23:13 am
content: Quote from: imo on September 18, 2018, 09:57:34 amYikes...I am thinking about form factor: Arduino Mega sized, or a more spread out style? I am obviously going with eMMC or microSD for storage as kernel and rootfs is way too large for 640kB. Ethernet is given too. There is no place for Wi-Fi though due to the lack of available high speed interfaces. I wonder if it will work with a 1024x600 capacitive touch screen or is that too many pixels. Too bad the EBI and LCDIF conflicts, and the PMP is way too slow, otherwise I might have some other curiosities available.

author: andersm
author_rank: Super Contributor
timestamp: September 18, 2018, 10:44:12 am
content: There's a Buildroot environment and BSP available under Microchip's GitHub, but they haven't really been touched in three years. I don't see the chip as a useful Linux platform though, it's far too slow and resource-constrained compared to what's available elsewhere.

author: technix
author_rank: Super Contributor
timestamp: September 18, 2018, 11:38:28 am
content: Quote from: andersm on September 18, 2018, 10:44:12 amFor me as soon as a kernel boots it would be 90% done, since I just run Debian on top of that, and they have a nicely automated build system.
LED blink using timer0 in MikroC - Page 1
Forum section: electronics / general

author: khatus
author_rank: Regular Contributor
timestamp: September 17, 2018, 12:48:59 am
content: Hello guys I want to create a program for pic 18f2550 timer0.In which a led will blink after every 10ms. I have used the Timer calculator of mikroC Which generates the following codesI have used the following specificationMCU pic18f2550OSC: 20mhzTimer: timer0Prescaler: 1:1Code://Timer0//Prescaler 1:1; TMR0 Preload = 15536; Actual Interrupt Time : 10 ms//Place/Copy this part in declaration sectionvoid InitTimer0(){T0CON= 0x88;TMR0H= 0x3C;TMR0L= 0xB0;GIE_bit= 1;TMR0IE_bit= 1;}void Interrupt(){if (TMR0IF_bit){TMR0IF_bit = 0;TMR0H= 0x3C;TMR0L= 0xB0;//Enter your code here}}I slightly modified it to use in my program Which is as belowCode:#define LED PORTB.B0int count = 0;void InitTimer0(){T0CON = 0x88;TMR0H = 0x3C;TMR0L = 0xB0;GIE_bit = 1;TMR0IE_bit = 1;}void Interrupt(){if (TMR0IF_bit){TMR0IF_bit = 0; // clearing the flag after the overflowTMR0H = 0x3C;TMR0L = 0xB0;//Enter your code herecount++ ; // adding 1 in count after 10 milli second timer interrupt}}void main(){InitTimer0(); // calling the init procedure that contain the necessary register modifications to get the timer workTRISB = 0x00; // declare PORTB as output for ledLED = 0; // initially led is offwhile (1){if (count == 1) // count = 1 means 10ms*1 = 10ms = 10 ms{LED =~ LED ;count = 0; // clearing the counter after 10 ms}}}But still it does not generates any led blink after every 10ms. Please check my code and correct if it is wrong.

author: Ian.M
author_rank: Super Contributor
timestamp: September 17, 2018, 01:59:26 am
content: As LED is used for single bit output, you are reading back its value to toggle it and you are using a PIC18, LED should be #defined asCode:#define LED LATB.B0to avoid possible issues with the read-modify-write effect.Also the definition of count should be modified:Code:volatile unsigned int count=0;The 'volatile' qualifier tells the compiler that the ISR can modify the variable in the background, so it checks the actual variable in the if() in main() rather than optimising the check away or using a temporary copy of count within the loop.The unsigned qualifier is because there is no need for negative counts, and without the wasted sign bit it can time up to just under 11 minutes.Some other refinements that would be needed in a larger program would be to disable interrupts in main() while count is being checked or updated to prevent problems if main() is interrupted when its accessing count right in between the accesses to its high byte and its low byte, and to check count with if(count>1) so that if some other part of the program took longer than 10ms, the check wouldn't fail because count had already gone past 1.

author: khatus
author_rank: Regular Contributor
timestamp: September 17, 2018, 02:05:20 am
content: Thanks it works !!!
FS (UK) NXP MCIMX6Q-SL Sabre Lite, Quad-Core ARM Cortex development board - Page 1
Forum section: electronics / general

author: TopLoser
author_rank: Unknown
timestamp: September 15, 2018, 02:34:32 pm
content: GONE!

author: DC1MC
author_rank: Super Contributor
timestamp: September 15, 2018, 03:01:59 pm
content: Heh, first.Cheers,DC1MC
PIC24: VREF > VDD? - Page 1
Forum section: electronics / general

author: Pack34
author_rank: Frequent Contributor
timestamp: September 14, 2018, 10:41:17 pm
content: I was looking at being able to measure the rail feeding the PIC using a space analog pin, however, if it's powered by that one rail it would just respond with 0xFF when sampling since the pin you're measuring is at the reference.I know that if I were to attach a 3.3V reference to the analog reference pin on the PIC it would allow me to capture the value if the power supply of the PIC is greater than the reference, but what about when the PIC's power supply is something like 3.1V or 2.9V? Would the ADC inside of the PIC behave and give me a correct value? or would it behave strangely since the voltage reference is greater than the power supply of the chip?

author: cv007
author_rank: Frequent Contributor
timestamp: September 15, 2018, 01:59:14 am
content: QuoteI would assume the pic24 has a channel input from some fixed voltage, like a band gap voltage. You don't even need a pin. Measure the adc value of the bandgap and simply work out the Vdd voltage (or whatever is used for Vref).adcval / Vbg = 255 / VrefVbg * 255 = adcval * VrefVbg * 255 / adcval = Vrefif Vbg is 1.2vVref * 100 = 1.2*100 * 255 / adcvalif adcval = 127Vref * 100 = 120 * 255 / 127Vref * 100 = 240 (2.40V)edit-255 is assuming 8bit adc, change accordingly and double check that some of these multiplications stay inside the var type usedthe *100 is just to get some fractional values using integers (first fraction digit probably usable, the rest probably not so much)

author: JPortici
author_rank: Super Contributor
timestamp: September 15, 2018, 05:27:24 am
content: You didn't say which PIC24 so i have no idea of what solutions can be possible.Anyway, if there is the AVDD/AVSS, AVDD mustn't differ more than 0.3V from VDD.if you want to use an external VREF, VREF+ musn't exceed AVDD, VREF- mustnt go lower than VSS and VREF+ > VREF-the PIC24 probably have a bandgap voltage reference available as an analog input so you can use it to measure Vdd as cv007 said, but you'll have to calibrate it because initial accuracy and temperature drift are not that goodotherwise, if you also have a different regulated rail or you are willining to put a reference voltage of any kind you can measure that one. i.e, a 2.5V one, measure it. a 5V one, use a resistor divider and measure it et cetera

author: iMo
author_rank: Super Contributor
timestamp: September 15, 2018, 07:35:30 am
content: With pic24 you may set the Vref to Avdd or you may use an external Vref. I used to use an LM385-1.2 or -2.5 in past (with a 10k resistor).You may also use a voltage divider from Avdd to ground, say 10k-10k, and do measure the voltage in the middle.Pic24 has got a 12bit ADC, so your reading shall be something like (3.3 / 2) / (2.5 / 4096) = 2703 with 2.5V Vref.PS: a TL431 is also an option (2.5V).
First time with xbee api mode  - Page 1
Forum section: electronics / general

author: bob7185
author_rank: Contributor
timestamp: September 14, 2018, 02:24:23 am
content: Hi everyone , I am currently working on a project involving a pic 18f46k22 connected to a xbee s2 acting as a coordinator in a simple wireless sensor network. To speed up project development I wanted to use a library to handle the micro to xbee communications in api mode . The ones i found online are either for arduino or developped in java or phython I have no experience in neither one of those , so I was wondering if any of you has some generic code written in xc8 to handle xbee api mode ??
How to give a pulse for a certain amount of time? [STM32] - Page 1
Forum section: electronics / general

author: XaviPacheco
author_rank: Regular Contributor
timestamp: September 11, 2018, 01:36:23 am
content: I'm using a L432KC nucleo for my project. If I have some normal GPIOs (no timer channels) configured as output, how can I give a pulse for a certain period of time? Is this when One Pulse Mode comes to play?

author: newbrain
author_rank: Super Contributor
timestamp: September 12, 2018, 09:06:22 am
content: Well, if you intend to use One Pulse mode then timers are by definition involved.Depending on the needed time resolution, acceptable jitter, start conditions and repeat rate there is a number of different possible solutions: they range from using the SysTick ISR and a counter variable with a SW trigger, through some HW/SW hybrid, to one completely HW controlled by a timer peripheral.So the answer is
Read/Write KH 25L6436F - Page 1
Forum section: electronics / general

author: sjostrom1973
author_rank: Newbie
timestamp: September 12, 2018, 04:37:09 am
content: Hi im trying to read/write the KH 25L6436F in my Sricam SP17 , im using Mini Pro TL866A with adapter and SOP8 clamp but i cant find the eprom in TL866 software.I also got the Bus pirate 3.6 but i prefer the TL866 if its possible to use it for the 25L6436F
SNTP ESP-01 (esp8266) client for clock synchronisation of Nixie clocks et al. - Page 1
Forum section: electronics / general

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 14, 2018, 08:00:39 pm
content: I managed to get an accurate SNTP client that syncs reliably to less than 100ms of a local NTP server and generates a stream of NMEA/GPS messages to sync my clock. Given that my clock has a reasonable RTC this should pretty much guarantee my clock is accurate to the correct time within 100ms every day and should sort out the DST change too.If you are interested...https://gitlab.com/NivagSwerdna/ntpclientforclocksync/tree/master(And yes it isn't a full NTP discplined local clock but it's close enough)Share & Enjoy
MIPS Simulator - Page 1
Forum section: electronics / general

author: kfnight
author_rank: Regular Contributor
timestamp: September 13, 2018, 03:42:39 pm
content: I would like to simulate some C code on a Windows MIPS simulator. Sounds simple? Apparently not.

author: kfnight
author_rank: Regular Contributor
timestamp: September 13, 2018, 03:46:08 pm
content: Grrr, hit post too early.I'd like to use QTSpim, however it does not accept binary (intel hex, srec) files, and only accepts assembly (.s) files. That would be fine except GCC spits the assembly out in a form that QTSpim does not like, mainly absolute addressing. Does anyone know of a MIPS simulator for Windows that accepts binary files, or a way to get GCC to produce position-independent code for MIPS?

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 13, 2018, 04:41:14 pm
content: I think you should pass theCode:-fPICoption to GCC to generate position-independent code.I don't guarantee that it will work with the MIPS backend or with your simulator, but that's what I would try.
FS: SushiBits ARM Classic development kit - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: September 05, 2018, 04:46:39 am
content: Product link:https://www.tindie.com/products/maxtch/sushibits-arm-classic-development-kit/This is an ARM development kit based on the classic ARM7TDMI-S core, specifically LPC2103 chip. There is an additional microcontroller, STM2F042F4P6, serving as an USB to serial adapter with the options of instructing the processor to boot into bootloader mode.Oh, and @legacy you should come and get it.
question on sn74ahct125 chip use - Page 1
Forum section: electronics / general

author: firehopper
author_rank: Frequent Contributor
timestamp: September 04, 2018, 06:14:52 pm
content: I need one of these to convert a teensy's 3.3 volt signals to 5 volt for use with a dotstar pixel 8x8 matrix, and I want to make sure I'm using it properly. do I need to bypass the power signals? and I'm only using 2 out of the 4 sections of the device, what should I do with the unsused inputs? thanks for the help.

author: iMo
author_rank: Super Contributor
timestamp: September 04, 2018, 06:29:25 pm
content: Which signals you want to convert?

author: firehopper
author_rank: Frequent Contributor
timestamp: September 04, 2018, 06:58:13 pm
content: converting spi signals. clk and data. the micro dotstar doesnt like 3.3 volt signals. it works on a 5volt arduino mega 1280, not on a teensy 3.1 or 3.6 so I'm gonna put this inbetween and try that..

author: Ian.M
author_rank: Super Contributor
timestamp: September 04, 2018, 07:56:24 pm
content: Decouple its power pins - anything in the range 10nF to 100nF SMD ceramic should do, right next to Vcc, with a couple of vias to the ground plane. Ground unused inputs. Depending on your max SPI clock speed, the lower performance 74HCT125 will probably be preferable as its slower slew rate produces less EMI and it has less stringent decoupling and layout requirements.

author: David Hess
author_rank: Super Contributor
timestamp: September 05, 2018, 02:54:02 am
content: Ian.M recommended everything I might have.
TDC GP22 capacitor charging issue - Page 1
Forum section: electronics / general

author: maoterk
author_rank: Newbie
timestamp: September 09, 2018, 11:48:50 am
content: I am trying to develop a flow meter using the TDC GP22 chip. Does anyone have any experience with it?The circuit for testing is the same as in the picture attached.I have succeeded in correcting the frequency of the 4MHz oscillator which means that the communication with the chip and the stm32 i am using is working properly. I can also read from register 1 confirming communication.When i start the ToF procedure however, the capacitor that is connected to the receiver transducer never charges to 1/3Vcc (checked with oscilloscope) so that the received signal can be then processed by the chip for measurements. It should look like in the second picture attached but the received signal in my case stays around GND. Has anybody had any similar issues with the receiver part of the application?thanks
poblems with capturing the sine wave by ADS131e08 and display it by Chipscope! - Page 1
Forum section: electronics / general

author: javad2040
author_rank: Contributor
timestamp: September 10, 2018, 02:13:29 pm
content: Hi guys,I designed a Data Acquisition system with ADS131e08 ADC and spartan6 FPGA.I config the ADC and read data from it by my vhdl code that it contains several States. In this states, the ADC first reset and then the Config registers sets correctly.I set the ADC parameters to:CONFIG1 = 0xD2 , CONFIG2 = 0xF0 , CONFIG3 = 0xC0CH1SET = 0x10 , GAIN1 = 1 , MUX1 = 000 (normal input)CHnSET = 0x90 , n = 2...8 this channel power downedandFclk= 2.048 MHzFsclk = 18.432 MHzData Rates : 16 KSPSRESOLUTION = 24bitAVDD = +2.5vAVSS = -2.5vsine Wave (peek to peek = 2v) that is less than the ADC Vp-p = AVDD - AVSS.I use sine wave with frequency 50 Hz that period of it is 20ms. I sample the sine wave 256 times with ADC that total frequency is 256 x 50Hz. I produce this frequency by counter and send it to the Xilinx ChipScope and received data is semi-sine wave and has distortion (below figure) that must be sine wave because of ADC resolution (24 bit).I use oscilloscope to saw the sine wave, the Vp-p of it is whole 2v that is safe and less than the ADC inputs Vp-p.ALso i use the RDATA mode and set the VDD=3.3v that SCLK is 54 ns and when i connect the ADC board to the power, it inject the noise to sine wave and change the peaks of it(the figure captured by oscilloscope has shown), but when i disconnect the ADC board, the noise removed and sine wave be corrected.I use the ADS131e08 evaluation board schematic to design the board that pdf of schematic has uploaded.please help me to solve the problems(remove the injected noise and receive and capture the sine wave exactly).best regards,

author: hamster_nz
author_rank: Super Contributor
timestamp: September 10, 2018, 09:09:28 pm
content: Are your inputs locked in to the IOB?Have you put the proper timing constraints in?As a quick test, try latching the data serial data in the FPGA on the other clock edge (e.g. falling_edge() instead of rising_edge()) and see if that helps..
How many milliampere does STM32H7 take max ? - Page 1
Forum section: electronics / general

author: JanJansen
author_rank: Frequent Contributor
timestamp: September 04, 2018, 01:59:23 pm
content: Hi, how many milliampere does this chip : STM32H7 take max ?I am seeing 263 µ/MHz typical @VDD = 3.3 V and 25 °C in Run mode (peripherals off)i dont know what it means and i have peripherals on ofcourse.What results do you get ?Ofcourse @ 400MHz

author: tsman
author_rank: Frequent Contributor
timestamp: September 04, 2018, 02:20:54 pm
content: STM32CubeMX has a power consumption calculator. It takes into account what peripherals are enabled, what clocks are active etc...

author: JanJansen
author_rank: Frequent Contributor
timestamp: September 04, 2018, 02:56:23 pm
content: Ok, as you noticed i,m new.Trying to start with SMD also.Suppose the real maximum of everything what can i expect ?, around 100 milliamps ?

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 04, 2018, 03:06:05 pm
content: That will be somewhere over 100 mA. But it will really depend on the exact model and on what peripherals are active.The µA/MHz figure is given with all peripherals disabled.You can get some real-life figures in the datasheets in the "Electrical characteristics" section.For instance, looking at the STM32H743xI one, you can read 160 mA typical in run mode @400 Mhz with all peripherals enabled.You can of course modulate this by disabling peripherals, playing with the low power modes, running code from RAM instead of Flash, disabling the cache, etc.

author: JanJansen
author_rank: Frequent Contributor
timestamp: September 04, 2018, 03:29:46 pm
content: Whatever runs the fastest i have to find out, i was just curious what to expect.very good 160milliamps @ 400MHz

author: hans
author_rank: Super Contributor
timestamp: September 04, 2018, 05:09:31 pm
content: µA/MHz shows how much current will be consumed scaled per clock frequency.263 µA/MHz at 400MHz, means that 0.263*400 = 105.2mA is consumed.This is probably only for the core with oscillators (PLL) included. If you enable peripherals, they will also add a certain amount of µA/MHz to that figure. For absolute worst case, you would need to enable all peripherals at once, at the highest frequency, and "exercise" them such that they consume their max power.Considering the large amount of peripherals that the STM32H4 has, I believe it that the chip could consume well over 125 or 150mA in a typical application. Ethernet, USB, external memory controllers, high-speed GPIOs all consume a fair amount of power.165mA is not "typical", however it's always nice to design the hardware for corner cases like this, e.g. everything will stay working with maximum power consumption, temperature, etc.
AVR jtag ice is not connecting - Page 1
Forum section: electronics / general

author: NASK
author_rank: Contributor
timestamp: August 28, 2018, 06:21:01 am
content: I am new to AVR programming and i wish to use AVR JTAG ICE v.2 with atmel studio 7, but it is not connecting. i have not connected the ic yet. Is there any driver needed? Is it essential to connect an ic?

author: NASK
author_rank: Contributor
timestamp: August 28, 2018, 09:50:27 am
content: I think this AVR jtag ice is only compatible with lower edition like atmel studio 4; where can I purchase compatible with atmel studio 7?

author: TK
author_rank: Super Contributor
timestamp: August 28, 2018, 09:45:38 pm
content: The AVR Dragon is compatible with the latest development tools and the price is reasonable
STM32F767ZI interface with DAC (DAC082S085) - Page 1
Forum section: electronics / general

author: A.Ersoz
author_rank: Regular Contributor
timestamp: August 27, 2018, 07:22:49 pm
content: Hello Guys,I plan to use STM32F767ZI USART port in synchronous mode and control DAC (DAC082S085) for generating two Analog Signals. I also want to control the amplitude of these analog signals. So, how can I do in CubeMx and Keil?Thank you,Alpaslan

author: newbrain
author_rank: Super Contributor
timestamp: August 28, 2018, 04:22:55 pm
content: Quote from: A.Ersoz on August 27, 2018, 07:22:49 pmWhy would you want to do that when literally the first page of the DAC datasheet states:Quote

author: A.Ersoz
author_rank: Regular Contributor
timestamp: August 28, 2018, 05:35:24 pm
content: Yes, you are right! On my custom board, pins are connected with UART ports. Now, I will jump with cables for using SPI Half-duplex mode.
[Solved]Headbanger: STM32F042F4 refuses to work with any debugger - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: August 28, 2018, 12:02:27 pm
content: When I tried to program the STM32F042 chip used on SushiBits ARM Classic, the contents always ends up corrupted. Why?Example of corruption:Code:J-Link>eraseErasing device...****** Error: Failed to download RAMCode.ed @ address 0x200001A4.Write: 0xBD0F27FF B096B5F7Read: 0x7A0F27FF B096B5F7Failed to prepare for programming.Failed to download RAMCode!ERROR: Erase returned with error code -1I have tried ST-Link (using both OpenOCD and ST-Link STM32 tool) and ULINK 2 clone (CMSIS-DAP firmware, over OpenOCD) as well as J-Link v9 clone. None worked.All debug probes works fine with other STM32F042 boards.Edit:Solved: I was suffering from a bad case of power supply ripple.

author: ogden
author_rank: Super Contributor
timestamp: August 28, 2018, 12:20:15 pm
content: Double-check that you properly set-up compile settings for actual microcontroller you have on the board. Did you try to compile and load any (simple) sample project?

author: technix
author_rank: Super Contributor
timestamp: August 28, 2018, 12:26:16 pm
content: Quote from: ogden on August 28, 2018, 12:20:15 pmI did. It worked at first, then it just stopped working out of the blue. Now I can't even erase the chips without it spewing out some RAM error.

author: ogden
author_rank: Super Contributor
timestamp: August 28, 2018, 01:27:37 pm
content: Chip could be damaged then. Those things does not cost much - get another one and try

author: technix
author_rank: Super Contributor
timestamp: August 28, 2018, 02:01:24 pm
content: Solved: I was suffering from a terrible case of power ripple. The 2.2uH/47uF aluminum output filter of the 5V-3.3V buck was nowhere adequate to filter out the ripple. Fixed by replacing the output filter with 4.7uH/47uF MLCC.And I accidentally ran a 48MHz chip at 96MHz, so the software is also acting up.
SAMD21 and EM noise - Page 1
Forum section: electronics / general

author: anvoice
author_rank: Frequent Contributor
timestamp: August 27, 2018, 10:25:40 pm
content: My SAMD21 will possibly face some EM noise (motor some distance away and a spinning magnet a few millimeters from the chip), so I was looking at the datasheet wondering which protection measures I need to implement.Power supply connections: my power is coming from a buck converter placed close to the chip, so I would like to know which decoupling capacitors I should use (Section 42, page 1152 of SAMD21 datasheet). Specifically, there is no GNDANA pin on the SAMD21E I'm using, or VDDIO, so clearly I can't place capacitors there. Is a decoupling capacitor on VDDIN still needed given the buck output is very close?Reset RC filter: is that really needed? When the chip will be programmed, the motor will be off and the normally spinning magnet stationary, so I don't envision much noise at that time. Should I still implement the RC filter on the reset pin?Thanks in advance.

author: ataradov
author_rank: Super Contributor
timestamp: August 28, 2018, 03:55:32 am
content: I would at least place a footprint for the second capacitor.On the reset pin you may not need the RC filter, but external pull-up resistor is highly recommended in high EMI environments.

author: anvoice
author_rank: Frequent Contributor
timestamp: August 28, 2018, 04:31:10 am
content: Do you mean the capacitor going to VDDIN (the one I labeled C4 in the attached picture)? What about the inductor and the 10uF capacitor (C5) between 3.3V and ground?So the EMI might trigger the Reset pin despite the internal pull-up. Is 1K a good value to use for the Reset pull-up, or should something weaker/stronger be used?

author: ataradov
author_rank: Super Contributor
timestamp: August 28, 2018, 04:34:29 am
content: C5 here really represents your capacitor on the regulator output. And inductor is there to cleanup VDDANA. It is there for analog performance, but in a device with combined power supplies pins and noisy environment you should not expect excellent analog performance anyway.In general all available supply pins should get a separate capacitor.Internal pull-up is around 100 K. Even 10K external resistor will work. For 1K you would need to check if it will work with your programming tools. Some may have current limiting on the output and may not be able to fully drive it to ground.

author: anvoice
author_rank: Frequent Contributor
timestamp: August 28, 2018, 04:54:07 am
content: Got it. That includes VDDANA I'm guessing?

author: ataradov
author_rank: Super Contributor
timestamp: August 28, 2018, 05:11:10 am
content: Quote from: anvoice on August 28, 2018, 04:54:07 amif you are talking about the bypass capacitor, then yes.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 28, 2018, 11:34:26 am
content: Yes, it is alright to share bypass caps between nearby pins/devices.Tim
jtag connection with urjtag - Page 1
Forum section: electronics / general

author: ruggb
author_rank: Newbie
timestamp: August 21, 2018, 12:25:51 pm
content: I am trying to begin my JTAG journey and can't get past connecting to my adapter.I am on W10 with urjtag program.I have a YS-CH341T USB adapter. Connecting it to my computer it is USB-SERIAL CH341A (COM9)I open urjtag and have no clue which cable to try to use. The ones I tried failed, but some seem to require additional info and how does it know which port I am on (COM9)? I have read lots of documents but have not found anything yet.Can anyone get me started?thx

author: Heartbreaker
author_rank: Unknown
timestamp: August 27, 2018, 05:25:04 pm
content: Quote from: ruggb on August 21, 2018, 12:25:51 pmIs your adapter supported by URJTAG?
What is PS7 SPi ? How it differs from standard SPI? - Page 1
Forum section: electronics / general

author: sangar
author_rank: Regular Contributor
timestamp: August 27, 2018, 09:57:08 am
content: Hello All,I have just look at Analog devices for interfacing Wideband receiver with FPGA. They were talking about PS7 SPI to configure AD9361. I am curious to know how it differs from standard SPI and any FPGA comes with this IP.. Please share your knowldge if anyone came across this...Thanks,Sangar

author: JPortici
author_rank: Super Contributor
timestamp: August 27, 2018, 10:17:29 am
content: googling "PS7 SPI" returns a bunch of links where the FPGA is a Zynq and PS7 may refer to "processor Subsystem 7" so a peripheral specific to the zynq
Programming SAMD21 by SWD: pin question - Page 1
Forum section: electronics / general

author: anvoice
author_rank: Frequent Contributor
timestamp: August 27, 2018, 05:40:55 am
content: Hello, I'm trying to design a PCB with the SAMD21 to be programmable by SWD and have a question about the pin connections for the programmer. The datasheet lists several connections, including SWDCLK, SWDIO, RESET, GND, and VTG.The MCU gets power from a buck converter embedded in another chip, so I have two voltages in the system: about 12V, and 3.3V from the buck converter that feeds the SAMD21. So I'm guessing I should connect VTG to the 3.3V, not the 12V, but wanted to make sure that's right.Please let me know if my assumption is correct.

author: ataradov
author_rank: Super Contributor
timestamp: August 27, 2018, 06:15:27 am
content: Yes, this is correct. You should never have more than 3.3V on any of the programming pins.

author: anvoice
author_rank: Frequent Contributor
timestamp: August 27, 2018, 07:02:09 am
content: Thanks, good to know.On a related note, I notice that it's said that on the version I'm using (SAMD21E), only pins PA08/PA09, PA16/PA17, and P22/PA23 support Hs (High-speed?) I2C mode. I was hoping to use the same pins for SWD and I2C control of the chip during normal operation, but that looks to be unattainable. However, I don't understand why pins PA00/PA01 can't be used for the same I2C mode as the rest of those listed, since they also map to pads 0 and 1 on Sercom1? Is it indeed the case that I must use one of the listed three pairs, or can I somehow make use of PA00 and PA01?

author: ataradov
author_rank: Super Contributor
timestamp: August 27, 2018, 07:57:14 am
content: Pins specifically marked as I2C HS compatible have pads with high drive strength. It only matters if you use I2C above 400 kHz. For normal use, you can use any pins with I2C SERCOM pads.
C, H and PRJ Files – EDF Energy Quality Monitor from Electronic Practique? - Page 1
Forum section: electronics / general

author: Chris56000
author_rank: Frequent Contributor
timestamp: August 27, 2018, 05:45:18 am
content: Hi!Attached is the project file for the "EDF Power Quality Monitor" published in the French Magazine "Electronique Practique" for September 1999 another Member found for me, but I've realised if I progam the device as it is the displays will all be in French!Can more knowledgeable Members please have a quick look at the project files and let me know what they would have been compiled with and what the extensions mean, so I can study them and recompile the source into English before I blow the device?I've got a UV 87C52 on order and have access to a programmer at work!Chris WilliamsPS!Does the TL866 support 87C52s? i've mislaid my documentation that came with mine!

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: August 27, 2018, 06:41:39 am
content: It looks like the Keil C51 compiler to me.ETA: Given the simplicity of the project, I would be inclined to rework the project using AVR.