hybridfree/eevblog-posts huggingface dataset:
Problem with NHD?C0220BiZ?FSW?FBW?3V3M I2C Display - Page 1
Forum section: electronics / general

author: rill17
author_rank: Contributor
timestamp: March 15, 2017, 03:45:59 pm
content: I am designing a project which uses the NHD?C0220BiZ?FSW?FBW?3V3M I2C display, however i am failing to display any characters despite receiving an acknowledge from the in built ST7036 controller. I think the problem might be the LCD initialization, the datasheet is quite poor when it comes to sending data. Attached i have the data i am sending the display as captured by a serial decoder. i tried two methods, one with added delays and the other without delays(delays as specified in the datasheet). Can anyone tell me what i am doing wrong??

author: Throy
author_rank: Regular Contributor
timestamp: March 15, 2017, 04:26:12 pm
content: Have you tried their initialization code?https://newhavendisplay.com/appnotes/excode/txt/CoGLCD/C0220BiZ.txt

author: rill17
author_rank: Contributor
timestamp: March 15, 2017, 04:30:48 pm
content: yeah, i sent the serial data in the second image based on that code, still nothing

author: Throy
author_rank: Regular Contributor
timestamp: March 15, 2017, 06:13:40 pm
content: It appears you've forgotten the "Slave" byte according to their code.It should be: 0x78 0x00 0x38 0x39 0x14 0x78 0x5E 0x6D 0x0C 0x01 0x06Or is the first byte not being interpreted correctly by your scope? It's kinda hard for me to read the clock and data lines.Nevermind I see the 0x78 in the table below as the address + R/W now.
Lattice IceCube Creating a clock - Page 1
Forum section: electronics / general

author: bentomo
author_rank: Contributor
timestamp: March 14, 2017, 04:52:43 pm
content: Hey guys,so I'm using a latticeice40HX8Kand I have an open source project implemented that I need to now modify. Basically someone was using a lattice part and said they were decent fo the price, and I picked up an ice40 not realizing that the tool chain is pretty bonkers for this line.The current design is being driven by an external clock but I want to use the internal PLL to generate another clock and run it off the board to a TFT LCD. If I use the PLL configuration tool it basically asks me for an input pin and an output pin, as if there's no internal OSC. It also creates them in verilog synthesis files, but my top level is written in VHDL so I'm not sure how to add this.So does anyone know how to create and implement a 40MHZ clock with this tool chain?

author: bentomo
author_rank: Contributor
timestamp: March 14, 2017, 08:02:45 pm
content: Thanks, it looks like I'm getting on the right track.I was able to use the pll module generator to take my input 54mhz clock and create a 40mhz clock. I also figured out that you can just select the file type when you're saving to be .vhdl and it will give you the vhdl component.Now I just need to figure out how to instantiate it. I feel like if I just instantiate it as if I included a library I should be able to but synplify pro synthesis complains that it's an undefined identifier.More to work through I suppose.EDIT: Ok I believe I figured it out. I won't know until I load it onto the board and confirmWhen you've gotten to the end of the PLL module generator tool you can save in verilog or VHDL. Pick your poison here.But when you save it will save 3 files not just one. The first is the module itself, you'll need to add this to your design source files. The second is an example of how to instantiate it into your design, not really needed but ok. The third is a .lpc file. I'm not sure what this is for but it sounds like an ice40 specific constraints file. I didn't need to include it but I left it in my directory.Following the rather vague instructions from the ice40sysCLOCKpllDesignandUsageGuide1. include the module in your component libraries2. Instantiate the component into your top level and hookup your input clock, output signal, and reset if you want oneIn hindsight this process is pretty straight forward so I can't complain too much. The documentation is there for how to use the PLL module generator, just not for what files are generated. I have some fpga experience so I feel like it shouldn't have taken me 3 hours to figure out how to put the pieces together.
STM32F7 fix for newer Microchip HS-USB PHY - Page 1
Forum section: electronics / general

author: Koen
author_rank: Frequent Contributor
timestamp: March 14, 2017, 10:35:06 am
content: Hello,as you may know, certain newer/improved Microchip PHYs weren't useable in HS mode with certain STM32 microcontrollers. They were stuck in FS mode due to a missing clock delay after commands.A presentation from ST titled "USB OTG v2.x" announced an "ULPI interface fix to support new SMSC PHYs" which gave me hope but I never heard back from ST technical support.ThenMartin Devera in STM32F2/F4 problems with various ULPI USB PHYsfound XCVRDLY in the new STM32F7 reference manual. Which indeed allows the use in HS-Mode of USB334x with its smaller package, improved ESD protection and embedded LDOs.Just posting this to give it some exposure.Have a nice day,Koen
LPC5411x Series DMA caution - Page 1
Forum section: electronics / general

author: ehughes
author_rank: Frequent Contributor
timestamp: January 25, 2017, 01:20:05 pm
content: Just another caution flag for anyone using the LPC5411x series. (It is a nice little dual core ARM cortex). There is a hardware bug in the DMA engine when using the ADC. You cannot use it for continuously linked block transfers from the ADC (say a ping pong buffer). Lots of details here:https://community.nxp.com/message/864054

author: JPortici
author_rank: Super Contributor
timestamp: January 25, 2017, 02:49:41 pm
content: thanks. i was planning to test that chip in a simillar configuration(wish it had usb too!)

author: ehughes
author_rank: Frequent Contributor
timestamp: January 25, 2017, 03:29:07 pm
content: It does have a USB device port.Also, I did get what I wanted working with a nasty workaround but it meant using up quite a bit of CPU time.

author: cgroen
author_rank: Unknown
timestamp: January 25, 2017, 04:38:11 pm
content: ehughes,sorry for being totally OT here, but can you tell me what frequency you run the 54608 SDRAM at ?I wrote a message on the LPC forum in your threads but guess you did not see it. I have problem here going beyond around 75 MHz (CPU at 150 MHz and SDRAM at div/2).(I have 54608 samples coming in in about a weeks time)

author: JPortici
author_rank: Super Contributor
timestamp: January 25, 2017, 06:05:53 pm
content: Quote from: ehughes on January 25, 2017, 03:29:07 pmit does? must be new because when i checked the series a couple of months ago they didn't have one with USB

author: ehughes
author_rank: Frequent Contributor
timestamp: January 25, 2017, 09:01:45 pm
content: QuoteI believe I had it a 90MHz but will double check.

author: nctnico
author_rank: Super Contributor
timestamp: January 25, 2017, 10:07:28 pm
content: Is any of this explained in the errata sheet or is this device very new?

author: ehughes
author_rank: Frequent Contributor
timestamp: March 13, 2017, 04:23:48 pm
content: QuoteI just checked that I am running the CPu at 180Mhz. The SDRAM is divided by 2 and running at 90MHz.

author: cgroen
author_rank: Unknown
timestamp: March 14, 2017, 08:56:59 am
content: Thanks Eli!Mine fails constant above 75 MHz. I'm getting my own PCB in a few days, then I will test on that and see if there (hopefully) is a difference.
Experience with MachXO3 - Page 1
Forum section: electronics / general

author: blueskull
author_rank: Unknown
timestamp: March 04, 2017, 08:00:20 pm
content: Hi all. Is there anyone who has used MachXO3 before? It seems its sysCONFIG port is much more complicated than iCE40 (or probably I've been working too much with iCE40).How to configure MachXO3 devices? I want to use I2C to config it.How to terminate SSPI port and JTAG (I assume just to pull down SCK or pull up CS for SSPI, and pull down JTAGENB for JTAG?), and how to terminate INIT# and PROGRTAMN#?From what I understand from its manual, it seems like for the first time of programming, I can use I2C to perform the initial programming, and enable I2C persistence port for future use (once programmed with DEFAULT feature row, I2C sysCONFIG port is closed after initial programming).My host processor will connect to FPGA's I2C port only. It will be also connected to its SSPI port, but not using standard SPI protocol. QSPI will be used as high bandwidth interface, and I don't want to fiddle with BSP's driver code. So configuring through SSPI is not possible.I will need to program SRAM (for R&D) as well as program FLASH (for production). Some calibration data will be stored in UFM blocks, so reading UFM is also needed.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: March 05, 2017, 01:32:57 pm
content: From memory, with the XO2, anything other than JTAG needs to first be enabled on a factory-fresh part via JTAG.I'd suggest you just connect to JTAG if possible. Lattice provide source code for JTAG programming from an MCU (IspVM) , from data in a file or CONST arrays. This makes things easy for production - first time board is loaded with software, it programs the FPGA. You can also extend this to have the SW identify the FPGA version ( via its run-time inrterace) and automatically update the FPGA if necessary.

author: laugensalm
author_rank: Regular Contributor
timestamp: March 12, 2017, 11:54:02 am
content: Hi,for development, I would also strongly recommend not to disable JTAG, in case you lock yourself out.I guess you've read pretty much all about the feature row in the XO3L, so I assume you're aware that it doesn't like frequent reprogramming, unlike the XO2 (real) flash.Things get tricky when you simultaneously enable the EFB (extended function block). I've come across some conflicts that required disabling the EFB and using a soft SPI controller again. So you might want to design your first prototype with a few alternate SPI pin options.I personally would go with the MACHXO2 for development and move on to XO3L for mass production. From the technologies, there doesn't seem to be much difference, porting my design went amazingly smooth.
DEO NANO SoC using FIFO - Page 1
Forum section: electronics / general

author: mriPaul
author_rank: Contributor
timestamp: March 13, 2017, 07:35:35 pm
content: I am a novice with the FPGS HPS hybrid. However, I do have experience with PIC microcontrollers. Having experimented with the DEO NANO SoC, I can now draw logic elements and/or combined with Verilog code to get data in and out of the FPGA. I can go through the tutorials where I write to a register in c code and it gets processed by the FPGA to drive GPIOs/LEDs. However, the through-put speed is set by the c code and I now want to write data to a FIFO buffer in c code and have the FPGA dictate the speed to receive and process the data. I just went through an Altera FIFO Memory Core note and I think I understand that part. I need help with Qsys in knowing what to add and what to connect. Does anyone have an example they would share to get me in the right direction? Thank you in advance.
How do you write and read from the PIC32 UART Tx and Rx buffers? - Page 1
Forum section: electronics / general

author: mapexmbirch
author_rank: Contributor
timestamp: March 12, 2017, 01:00:27 pm
content: HiThe PIC32 has two 8 level buffers, one for Rx the other for Tx. How do I read say line 6 of the Rx buffer and how do I write to line 6 of the Tx buffer?I can't see it in the datasheet any where.There are the UxTXREG and UxRXREG registers, do the buffers get shifted along into UxTXREG and UxRXREG?Thanks

author: bktemp
author_rank: Super Contributor
timestamp: March 12, 2017, 01:22:36 pm
content: You can't write to individual locations, because it is a FIFO buffer. Just write to the TX register or read from RX register and the hardware handles the buffering/shifting.

author: mapexmbirch
author_rank: Contributor
timestamp: March 12, 2017, 02:10:14 pm
content: So, if I want to read the 6th line of the Rx buffer I just have to read the UxRXREG 6 times?

author: BrianHG
author_rank: Super Contributor
timestamp: March 12, 2017, 02:52:57 pm
content: Yes. Whenever there are any characters in the buffer to be read, just copy that main location, 1 by 1, checking the empty flag, into your own 6 character long FIFO buffer. Now you have access to any character you want, it will only eat 6 bytes of ram. You can also make your own read buffer any number of characters you like.Basically, (ok, I oversimplified thing, you can use a loop and make a 20 character buffer history for the rxcom)Code:while ( uxreg not empty ) {charbuf = charbuf;charbuf = charbuf;charbuf = charbuf;charbuf = charbuf;charbuf = charbuf;charbur = uxrxreg;}Now, if you want character 6, read charbuf#6, if you want character #1, use charbuf#1.This is excellent if you have say a 4 character command with a CR/LF at the end, just monitor for the CR/LF and use the contents of the earlier charbuf#s buffer since they will still contain your command contents.Oh, and if this is an interrupt service of your own making, make charbuf is a global array so that their contents are not lost since your probably getting single characters much slower than the execution speed of your code and you don't want to sit there waiting for all your characters to come in.Now when I say waiting for CR/LF, you will be checking charbuf#6 and #5. You obviously cant be always reading the rxreg. Aslo, after the test, if you want to only execute a command one, once executed, just clear out all the 'charbuf#s = 0;'. Now you cleared the valid CR/LF terminator and... I'll let you figure out the rest.

author: mapexmbirch
author_rank: Contributor
timestamp: March 12, 2017, 03:05:42 pm
content: Thanks all
MIDvec C Library - ML, DSP, and more for Embedded - Page 1
Forum section: electronics / general

author: MIDvec
author_rank: Newbie
timestamp: March 11, 2017, 07:58:27 pm
content: Hello everyone,I am the developer of the MIDvec C Library. MIDvec stands for (M)achine Learning, (I)mage Development, (D)igital signal processing, and (vec)tors. MIDvec is a code library which abstracts these features of scientific computing to a lightweight console-based C interface. Because MIDvec is implemented in C, it is ready and easy to use for operating with embedded platforms.With MIDvec it is easy to: Build and train an ANN, generate and edit Bitmaps, and perform DSP operations such as FFT or FIR filter generation. In addition, MIDvec abstracts plenty more menial tasks such as linear vector generation and complex number operations.What separates MIDvec from other scientific computing libraries is primarily the C implementation. This makes MIDvec fast, portable, and ready for embedded applications. No bloated interface, no Install Wizards, and no setup routines. All features are directly exposed to the user.MIDvec is available on Binpress. It offers a reduced-price "Hobbyist License" which restricts commercial use but allows comprehensive evaluation of the MIDvec environment.http://www.binpress.com/app/midvec-c-library/4181Thank you all for your time. I plan on providing periodic updates on the progress of MIDvec in this thread, adding more machine learning and mathematical methods, if you are interested. It is my hope that with MIDvec I can extend the commercial accessibility of scientific computing.
Getting started with DSP for audio - sanity check please - Page 1
Forum section: electronics / general

author: BCZ
author_rank: Contributor
timestamp: March 11, 2017, 04:27:53 pm
content: So I would like to get started with a DSP for audio processing for a speaker. Please let me know if what I'm doing makes sense and not crazy. And feel free to offer any suggestions and improvements.I want to build a DSP to implement some active filters and compressors and FIR for 8 channels of audio. Here is what my DSP workflow will look like, except with some differences such as I'll add another FIR filtering right after the input and a multi-band compressor at the end of the chain, and of course a different input.I'm thinking of getting a EVAL-21489-EZLITE board and use SigmaStudio and all their built in libraries to build what I want.Will this be as easy as just buying the evaluation board, hooking it up to my computer, drawing the DSP workflow on SigmaStudio, hit compile and boom it'll work?Also, I noticed in SigmaStudio, the bass synth algorithm is available for the ADAU1701, but not available for ADAU1452 or ADSP214xx. Anyone know what's up with that? In fact, the ADSP214xx is missing a lot of algorithms that are available to the ADAU1701 and ADAU1452.Thanks
Cyclone V SoCKit - Software / processor - Page 1
Forum section: electronics / general

author: CM800
author_rank: Frequent Contributor
timestamp: March 10, 2017, 07:58:22 pm
content: Righto!So, I've managed to get my grubby little hands on a Cyclone V SoCKit. I've went through the SoC Hardware Lab 13.1...I've came to realise I'm way out of depth already... but I managed to get through and complete that side of things.Now, I've went over to the SoC Software Lab 13.1...They use ARM DS-5 and SoC EDS if I'm understanding this right...I'm a little concerned at this as they don't seem to offer a lite / free option.... Has anyone had experience with this situation?I've already busted my wallet on £160 of dev kit... no way I can afford multi-thousands for software.I am determined to continue and get this going! Even if I'm realising how misguided I was to this being a simpler development platform then designing my own PCB with a MAX 10 & STM32F4 on it.... I haven't even touched Linux or more powerful processors let alone a Duel core A9.... Any recommendations on what I should be doing / reading would be ----Great!----Oh, Also, heres the resources I'm using:https://rocketboards.org/foswiki/view/Documentation/ArrowSoCKitEvaluationBoard#Reference_Designs

author: andersm
author_rank: Super Contributor
timestamp: March 10, 2017, 10:07:26 pm
content: Quote from: CM800 on March 10, 2017, 07:58:22 pmThere's a free DS-5 Community Edition, but it's limited to developing Linux applications.How do you want to use the board? If you want to run Linux, all you really need SoC EDS for is to generate and build the preloader. The rest is just normal embedded Linux development, for which there's a ton if different ways (eg. Yocto, Buildroot, PTXdist and so on). All of the HPS peripherals, and most of Altera's standard soft peripherals are supported in the vanilla Linux kernel, so you're better off going with something well-supported by the Linux community rather than whatever Altera are offering.

author: CM800
author_rank: Frequent Contributor
timestamp: March 10, 2017, 10:10:31 pm
content: Quote from: andersm on March 10, 2017, 10:07:26 pmNot too sure, I have no familiarity with Linux,I kind of liked the idea of running bare-bones on the processor. I feel it would be easier to understand / learn with just bare-bones.Maybe later on I'd like to toy with Linux on one core and a RealTime processor on the other.I don't really have any experiances with RTOSes etc. I generally have done more work on Arduinos, though I still have a firm understanding of peripherals, logic etc. (been touching on DMA recently)
Will this kind of sound hardware work on a 80C88 system? - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: March 14, 2017, 02:32:39 pm
content: The sound hardware includes:* One 8-bit parallel DAC with latched input,* One 16-bit reloadable counter,* Two 16-bit latches,* One channel on the PIT.* One channel on the DMA,* Glue logicThis sound hardware have twomodes of operation: PIO and DMA.In the PIO mode, the DAC is addressed directly by the processor through its I/O port. The counter and latches are unused, and the PIT channel is disabled.In the DMA mode, the two latches are used to store the beginning and ending pointers of the audio buffer in the memory, and the PIT channel is used to set the sampling rate. When the PIT fires the sound hardware generates a DMA request, pulling one sample off the main memory, and shoves it to the DAC. The counter is loaded with the beginning address (in latch A) when either its value is equal to the ending address (in latch B), or when latch A is being written to, or when the counter itself is being written to.

author: Cervisia
author_rank: Regular Contributor
timestamp: March 14, 2017, 03:07:30 pm
content: This looks quote similar to the digital part of the AD1848.DMA requests are typically triggered by some internal clock, not by the PIT.Why are you mentioning the address latches? Isn't that handled by the DMA controller?

author: technix
author_rank: Super Contributor
timestamp: March 14, 2017, 03:36:08 pm
content: I was planning for some way too simple DMA controllers. I have checked the 82C37 datasheet and obviously it have built-in address counters and latches. The use of PIT as the sample clock for the sake of reduced circuit. And this also allows me to build two operation modes out of no additional hardware: no PIT = PIO mode, PIT on = DMA mode.
USBasp (AVR programmer) overshoot/rinning normal? - Page 1
Forum section: electronics / general

author: sequoia
author_rank: Unknown
timestamp: March 10, 2017, 04:22:51 am
content: Is it normal for USBasp style AVR programmers have significant ringing on signals (MOSI, SCK, ...)? Over 8V peak on 5V logic level signal seems bit high... However, unit seems to function fine no issues programming ATmega328 chips...One I have is a some cheap Chinese version (under $2 shipped), but appears to be exact clone of the one sold here:https://protostack.com.au/shop/accessories/usbasp-avr-programmer/Only noticeable difference being silk screen saying "LC Technology" instead of "Lcsoft Studio"...Could it be just bad/wrong capacitors? (C1 is bit of suspect since it doesn't look like 4.7uF cap....)
Wifi Dev Board for Home Automation - Page 1
Forum section: electronics / general

author: TJ232
author_rank: Frequent Contributor
timestamp: November 08, 2016, 08:58:58 am
content: After some minor changes and a lot of testing I can say that now it's released into the wild:Wifi Dev Board for Home Automation.The idea behind was to design a safe, compact, all-in-one Universal WIFI MAINS (EU/US) compatible 8x High Power Relays board that can be easily used for industrial or home automation projects and experiments, fully compatible with Arduino, ARM, ESP8266, ESP32, PIC, RaspberryPI, etc.Happy breadboarding,TJ.Available also on Tindie Store:https://www.tindie.com/products/nEXT_EVO1/

author: TJ232
author_rank: Frequent Contributor
timestamp: February 17, 2017, 10:24:32 am
content: This time we will talk about the Software side we will design a very simple driver for our board that will include also a interactive Web command interface for the MPRSx8 Home Automation Dev Board Relays.To keep things simple, we will just add in our Web Interface 8 ON/OFF Buttons and one general OFF one, from where we can turn ON/OFF all the Relays switches.Original Article with full code example :WIFI Dev Board for Home Automation - Part 2Happy breadboarding,TJ.

author: Scrts
author_rank: Frequent Contributor
timestamp: February 17, 2017, 04:25:35 pm
content: Proposal for Rev2: make a 2x5 pin connector for expansion with SPI/I2C if possible. E.g. I may need to connect some GPIO expander or small LCD to show the IP address.

author: TJ232
author_rank: Frequent Contributor
timestamp: February 17, 2017, 04:34:35 pm
content: Should be another extra expansion connector or just replacing the existing ones?I'm asking because it has a separate nEXT Bus (I2C) Connector already there and also full ESP8266 pin-out on that 2 additional connectors.

author: Scrts
author_rank: Frequent Contributor
timestamp: February 18, 2017, 05:32:55 pm
content: Quote from: TJ232 on February 17, 2017, 04:34:35 pmIt's always good to have either or, right? I'd use regular 2x5 connector with aribbon cable. Someone else might want to do a sandwitch and use existing pins. Personally I feel that sandwitching in this case is not optimal, because the board on top or bottom would require more connectors and that's a hassle to mount into housing.

author: TJ232
author_rank: Frequent Contributor
timestamp: March 09, 2017, 08:03:54 am
content: Running some new tests, this time we will take a deeper look on the ESPEasy Firmware configuration and preparing the MPRSx8 Board for Domoticz integration.The MPRSx8 Board hardware is fully compatible with ESPEasy Firmware.Original Article:=http://www.esp8266-projects.com/2017/03/the-mprsx8-home-automation-devboard.htmlPart 3 of the MPRSx8 + ESPEasy Tutorial
Data Acquisition & Graphical Plotting: Maker Plot! What do you think about? - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: March 08, 2017, 11:29:33 am
content: so,makerplotseems a good application.Tempted to buy a license !You you ever used it? Satisfied?What do you think about?

author: Selectech
author_rank: Regular Contributor
timestamp: March 08, 2017, 06:23:05 pm
content: It's ok, it works. I have a licence copy.But I found this to be quite a bit more flexible & easy to set up - and it's free.https://kst-plot.kde.org/kst1/I've been using this to plot multi-channel data from microcontrollers ( up to 921600 baud ). { Just use comma separated data values , with CR/LF at end of channel set }I use something like Tera-term to catch the data from USB serial adapter & stream / log it to a file. KST periodically ( adjustable , but I use 150 mSec intervals } picks up data from the file & plots. Does all kinds of stats on the data, extra calculations ( FFT's etc }.

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 08, 2017, 07:38:12 pm
content: I haven't tried this but its worth mentioning.How about using nodejs with the serial port and pipe the data from the serial port to a canvas, you can get so much better visual plotting capabilities for free (d3 plot). It should be very fast as well its all async.

author: Rasz
author_rank: Super Contributor
timestamp: March 09, 2017, 04:24:26 am
content: orhttp://matplotlib.orgor ror matlab/octave
[Solved] Touch sensor MCU selection - Page 1
Forum section: electronics / general

author: blueskull
author_rank: Unknown
timestamp: March 09, 2017, 07:32:20 pm
content: Hi all. I'm working on a digital gadget that requires user interface, particularly, physical buttons and touch buttons.Is there any suggestion on which MCU to use to implement touch sensing?I will also need PWM, I2C slave and ADC features, so dedicated touch sensors won't work. UART is also welcomed for debugging purposes.I'm currently looking at MSP430 CapTIva, UFM8SB1 and PSoC 4000, I've used neither, and I can learn to use either.The chosen technology must have very small package, 0.4mm/0.5mm pitch WLCSP first. QFN up to 4mm*4mm is acceptable, WLCSP less than 0.4mm is not an option.I need moisture rejection, water spill rejection is not required. Wake up on touch is not needed. Operating voltage: 3.1V (3.2V Li-ion cutoff minus 0.1V LDO drop-out).Thanks in advance.Solved. PSoC4200 selected.

author: amitchell
author_rank: Regular Contributor
timestamp: March 09, 2017, 07:36:35 pm
content: Cypress seams to be the leader for touch. I am using the PSoC 4000S, moved from the Atmel Atmega328PB.The 4000S is the newest generation of touch. I am running at 1.8vI find the Cypress support to be better and I can get samples from them.

author: timb
author_rank: Super Contributor
timestamp: March 09, 2017, 08:56:36 pm
content: Yes, the PSoC 4200S series is very good when it comes to CapTouch MCUs. They have replaced the MSP430 as my go to micros for capacitive sensing. The S generation support some pretty advanced features, including CSX sensing (versus CSD), guard nodes, water proofing, support for button matrices, proximity, etc.Well worth looking into.

author: Dielectric
author_rank: Regular Contributor
timestamp: March 09, 2017, 10:42:47 pm
content: If you need an ADC, use the PSoC4xxxS series. The one in the non-S series is harder to use. The S family also has UARTs and more PWMs, all you get in 4000 is an I2C-slave and one TCPWM block. If you go with a 4100S, you can get an additional "real" SAR ADC instead of the CSD-ADC in the 4000S, which is nice.Plenty of package options, 24-QFN and 25-WLCSP are the smallest. Then 32-QFN and 35-WLCSP.For the moisture rejection, you can either use CSD (self capacitance) mode with shield, or try the CSX mode (mutual capacitance) which has some natural moisture rejection. You're smart enough to figure the rest out.
Microchip Tech PIC 8-Bit Explorer Dev Board - Page 1
Forum section: electronics / general

author: RedSpanner
author_rank: Newbie
timestamp: March 09, 2017, 03:35:55 am
content: Hi Folks,Has anyone had experience using this new dev board from Microchip Technology? It's a high-end (read: more expensive) dev board that has a lot of I/O capability and other programmable goodness baked in, and can support a variety of 8-bit PIC MCU. The manufacturer claims:QuoteI'm interested in this as a general purpose dev board that I can use to prototype multiple products without needing a new dev board (or early PCB spins) for each project. Looks like Microchip Tech is also expanding this high-end dev board concept to 16- and 32-bit MCU (and DSP unit as well), so they must think the idea has legs.What do you think?

author: Ian.M
author_rank: Super Contributor
timestamp: March 09, 2017, 03:56:09 am
content: The usual problem with fully featured Microchip dev boards is the lack of any way of easily disabling the fancy on-board stuff or moving it to another pin when it conflicts with whatever you need to prototype. Traditionally, they gave you pads for a jumper you have to cut the track between and fit a header to, but often not even that.However the Explorer 8 seems to be a little saner than usual - this time they've prepopulated the jumpers, but I would strongly recommend studying the user manual for its schematics to assess potential conflicts before you decide to buy.http://ww1.microchip.com/downloads/en/DeviceDoc/40001812B.pdfThere's a good large photo here:http://www.conrad-electronic.co.uk/medias/global/ce/3000_3999/3200/3210/3218/1403460_BB_00_FB.EPS_1000.jpg

author: hugo
author_rank: Regular Contributor
timestamp: March 10, 2017, 11:45:54 pm
content: Although expensive, MikroElektronika dev. boards are the best IMHO ... a happy customer

author: RedSpanner
author_rank: Newbie
timestamp: March 12, 2017, 03:28:54 am
content: hi Hugo,Thanks for this. Turns out these boards do support MikroElectronika daughterboards via Mikrobus.

author: RedSpanner
author_rank: Newbie
timestamp: March 12, 2017, 03:34:04 am
content: Thanks for the reply. I'll be taking a close look at your comments about the potential complexity introduced by all the extra logic/ other capabilities on the board. I was thinking about the advantage of these capabilities, but hadn't recognized the potential gotchas of this approach.

author: picandmix
author_rank: Frequent Contributor
timestamp: March 12, 2017, 09:49:43 am
content: Why not build your own dev board ?It does not have to be a fancy multi layered pcb; could be hand wired or simple single sided home made pcb.Make it so all the common parts like switches, displays, leds, PK3 are on the main board and have a connector to a smaller board designed for the Pic range you are working on.Something like the Eblocks method, but just two boards rather than a separate one for everything, though you could go that way if you wanted.https://www.matrixtsl.com/eblocks/
Having trouble getting my PIC32 ISR to fire? - Page 1
Forum section: electronics / general

author: RonMexico
author_rank: Newbie
timestamp: March 06, 2017, 10:54:33 pm
content: I'm just getting started with a PIC32MX340F12, and MPLABX. My first attempt was to write a timer interrupt, so I worked with the datasheet, compiler manual, and examples and came up with the below. But it doesn't work... the interrupt never fires, and in fact if I leave both the timer interrupt enable (T1IE=1) and the general interrupt enable active ("ei"), it runs for a few seconds then hangs (says "target halted" in debug mode). If I remove either of those, it just runs indefinitely but still no timer interrupt. So I appear to have a pretty bad problem somewhere in my ISR syntax. Does it jump out at anyone?Like I said I'm just getting started so I'm sure it's a pretty dumb oversight. And as you may notice I like to work as directly as possible with registers and compiler directives (rather than manufacturer supplied functions), I feel like I learn the most that way.Thanks!#include <stdio.h>#include <stdlib.h>#include "p32mx340f512h.h"#include <stdint.h>int x = 0;int main(int argc, char** argv){INTCONbits.MVEC = 1; // turn on multi-vector interruptsT1CON = 0; // set timer control to 0T1CONbits.TCKPS = 1; // set T1 prescaler to 8PR1 = 62499; // set t1 periodTMR1 = 0; // initialize the timerT1CONbits.ON = 1; // activate the timerIPC1bits.T1IP = 5; // T1 priority to 5IPC1bits.T1IS = 0; // T1 secondary priority toIFS0bits.T1IF = 0; // clear the T1 flagIEC0bits.T1IE = 1; // enable the T1 interruptsasm volatile("ei"); // enable interruptswhile (1){x++;if (x > 10000){x = 0;}}return (EXIT_SUCCESS);}bool zzz = false;void __attribute__((interrupt(IPL5AUTO))) T1Handler(void){IFS0bits.T1IF = 0;zzz = true;}
What does the ADCxCFG register on the PIC32 do?? - Page 1
Forum section: electronics / general

author: mapexmbirch
author_rank: Contributor
timestamp: March 06, 2017, 05:21:33 pm
content: HelloI am trying to setup the ADC on this PIC32MZ1024EFG064 and one of the registers has no information for it. It is the ADCxCFG register, I know there is one per ADC so x is 1 to 7.Here is the datasheet:http://ww1.microchip.com/downloads/en/DeviceDoc/60001320D.pdfCheers!

author: JPortici
author_rank: Super Contributor
timestamp: March 06, 2017, 05:57:50 pm
content: re-read the datasheet (and the reference manual)page 427 of current datasheet version (60001320D.pdf)it contains the calibration data

author: mapexmbirch
author_rank: Contributor
timestamp: March 06, 2017, 07:26:44 pm
content: Ah thanks!

author: JPortici
author_rank: Super Contributor
timestamp: March 06, 2017, 07:40:04 pm
content: Yes, i think it has become pretty standard on modern parts.. the ADC is characterized during silicon testing and calibration data is written on a read only area, instead of being just there.don't know the reason
Anyone else here use Picbasic pro? - Page 1
Forum section: electronics / general

author: mrcrud5
author_rank: Contributor
timestamp: February 23, 2017, 07:54:41 pm
content: Just wondering how many of you out there in this forum use it.

author: picandmix
author_rank: Frequent Contributor
timestamp: February 23, 2017, 09:43:53 pm
content: Don't use it myself, but do know someone who does and is happy with it.He's also talks about all the help he gets from other members of the PBP forum, currently 242 members online, so clearly quiet active.What are you trying to establish ?http://www.picbasic.co.uk/forum/forum.php?s=bbaeb7d1acf658df6c13e820d7b8d88b

author: @rt
author_rank: Super Contributor
timestamp: March 03, 2017, 10:34:58 am
content: I would if the project was suitable for it, and an 8 bit pic.Major letdown is no floating point variable type, or math,and lack of support for anything newer than .... newer than quite oldWith al the free Arduino stuff about, I don’t see any future for PBP as a commercial product though.
an easy way to remotely execute tasks as they were local - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: March 06, 2017, 06:31:14 pm
content: so, I happen to have a RISC machine, and gNAT doesn't exist. Therefore I am using the following trickMachineA: ip 192.168.1.20, RISC workstationMachineB: ip 192.168.1.24, i686 <-- gGNAT exists!MachineA and MachineB share a folder-tree through the net (NFS, CIFS, whatever)Code:host_remote="192.168.1.24" # MachineB's IPecho "step1"ssh-keygen -t rsaecho "step2"if [ ! -f ~/.ssh/id_rsa.pub ]thenecho "failure"exitfissh $host_remote mkdir -p .sshecho "step3"cat ~/.ssh/id_rsa.pub | ssh $host_remote 'cat >> ~/.ssh/authorized_keys'(to be executed from the MachineA's console)Code:host_remote="192.168.1.24"argc="$#" # how many arg from bash command line ?app_args="" # where to store arguments from bash command lineargs=("$@") # args[]={arg0..argC}here="`pwd`"argv="cd $here; source /etc/profile; "for ((i=0;i<argc;i+=1))doargi="$i"argv="$argv ${args[$i]} "donessh $host_remote $argvans="$?"if [ "$ans" == "0" ]thenansw="success"elseansw="failure"fiecho "$answ"on MachineA, /usr/bin/myrexec (bash script)Result, on MachineACode:remote_ctrl # myrexec gnat list -vGNATLS 4.3.5Copyright (C) 1997-2007, Free Software Foundation, Inc.Source Search Path:<Current_Directory>/usr/lib/gnat-gcc/i686-pc-linux-gnu/4.3/adainclude//usr/lib/gnat-gcc/i686-pc-linux-gnu/4.3/gcc/i686-pc-linux-gnu/4.3.5/adainclude/Object Search Path:<Current_Directory>/usr/lib/gnat-gcc/i686-pc-linux-gnu/4.3/adalib//usr/lib/gnat-gcc/i686-pc-linux-gnu/4.3/gcc/i686-pc-linux-gnu/4.3.5/adalib/Project Search Path:<Current_Directory>/usr/lib/gnat/failureCode:remote_ctrl # myrexec cat /proc/cpuinfoprocessor: 0vendor_id: GenuineIntelcpu family: 15model: 2model name: Intel(R) Pentium(R) 4 CPU 1.80GHzstepping: 7cpu MHz: 1794.360cache size: 512 KBfdiv_bug: nohlt_bug: nof00f_bug: nocoma_bug: nofpu: yesfpu_exception: yescpuid level: 2wp: yesflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtprbogomips: 3588.72clflush size: 64cache_alignment: 128address sizes: 36 bits physical, 32 bits virtualpower management:successUgly, simple, but it works

author: legacy
author_rank: Super Contributor
timestamp: March 06, 2017, 06:32:41 pm
content: both those machines are loaded with linux.
Net Delays on Vivado after implementation - Page 1
Forum section: electronics / general

author: gauravmp
author_rank: Regular Contributor
timestamp: February 20, 2017, 07:51:34 pm
content: Hi,I'm trying to find the delay through nets on Vivado after implementation but I'm not very sure where to find information about how to do this. Every time I look for something, I keep finding articles about ISE but I'm using Vivado 2016.. Can anyone familiar with finding net delays please let me know how to do this?Any help would be appreciated.Thanks,Gaurav

author: rstofer
author_rank: Super Contributor
timestamp: February 27, 2017, 05:43:26 pm
content: Well, this is going to tickle you! Sorry, I really couldn't resist...https://www.xilinx.com/support/documentation/sw_manuals/xilinx2013_1/ug835-vivado-tcl-commands.pdfpage 394http://www.edaboard.com/thread364102.htmlIt looks like these TCL commands are intended to be run in a batch file and I haven't gotten far enough with Vivado to try that kind of thing.

author: leavesw
author_rank: Newbie
timestamp: March 03, 2017, 02:14:43 am
content: Try "Report Timing Summary" within "Open Implemented Design", you should be able to find your nets there and analyze the delay and placement there.
STM32 Nucleo F446ZE, TIM2 input capture is inconsistent for higher frequency - Page 1
Forum section: electronics / general

author: AshStm32
author_rank: Newbie
timestamp: March 02, 2017, 10:38:34 pm
content: I am using Nucleo F446ze board. And trying to measure frequency from one of the GPIO pin(PA1) . I am using waveform generator to send input signal to PA1 pin . I am using TIM2 timer which is set to input capture mode on channel 2. My system clock is set to 180Mhz and APB1 timer clock to 90Mhz.I want to measure frequency upto 5Mhz from PA1 . when i run timer with prescalar 0 ..i could measure freq upto 150Khz. Over 15Khz the input capture is not consistent.Could anyone please guide me how so it configure TIM2 to measure frequency from 2Mhz to 5Mhz?Thanks for help in advance.

author: dgtl
author_rank: Regular Contributor
timestamp: March 02, 2017, 11:45:18 pm
content: Use the timer in external clock mode and let it count the number of pulses in a known interval. Either use another timer ISR to fetch the counter timer count at these intervals or even set up a DMA channel with timer trigger to read the data out of the count of the counter timer. Then substract the next measurement value from previous one to get increment rate and calculate frequncy from there.

author: AshStm32
author_rank: Newbie
timestamp: March 03, 2017, 09:19:52 pm
content: Thanks for the respond. I set it up TIM2 to external clock and ETR mode 1 and trigger source is on rising edge.I read the counter value in the main loop . So this is the count at rising pulse I believe. I am searching on web but haven't found any example that uses timer or DMA channel to get data out of the counter timer to measure freq.Could you please point me to any example if you know one?Regards
ATMEGA 328P not responding to USBasp - Page 1
Forum section: electronics / general

author: bharatcs
author_rank: Contributor
timestamp: February 24, 2017, 03:53:56 pm
content: I tried to program an ATMEGA 328P using an USBasp with arduino IDE .But I forgot to burn the boot loader instead I uploaded the led blink sketch.Now the ATMEGA 328P does not respond.Is it due to incorrect fuses?I even tried low speed programmingError message :avrdude:error:programm enable : target doesn't answer.1avrdude:initialisation failed,rc=-1

author: beenosam
author_rank: Regular Contributor
timestamp: February 25, 2017, 12:09:33 am
content: It could possibly be an incorrect fuse for the clock. I've encountered this before when burning stuff on Atmegas. What you want to do is hook up an external clock signal to the controller then try to reprogram the fuses.For the external clock signal I used another microcontroller and just toggled the pins on and off in the main loop. It may not work for you but it worked for me every Atmega I've had issues with so I can reprogram the fuses.

author: sleemanj
author_rank: Super Contributor
timestamp: February 25, 2017, 12:34:17 am
content: By the nomenclature, sounds like you are using the Arduino IDE.I assume you attempted to burn the (standard) bootloader, in doing so the first thing that does is set the fuses to expect a (16MHz) crystal/oscillator on it's pins, and you will need to provide that, or inject a square wave into XTAL1 in order to program again or change the fuses. Note that the bootloader won't have actually been burnt in, only the fuses will be changed at which point the bootloader could not be uploaded due to no clock.

author: bharatcs
author_rank: Contributor
timestamp: February 27, 2017, 06:00:48 pm
content: Thanks Guys.I will try to hook up an external clock.

author: bharatcs
author_rank: Contributor
timestamp: March 01, 2017, 08:46:32 am
content: It Worked.
Passing a PORT to a class -- Solved - Page 1
Forum section: electronics / general

author: dan3460
author_rank: Frequent Contributor
timestamp: February 28, 2017, 01:25:37 am
content: I have been reading about passing a port to a function, and seems simple enough. Now i'm trying to expand this concept to a class. To test I created a simple LED class:Code:class LED{//variablespublic:protected:private:volatile uint8_t *ledPort;uint8_t ledPin;//functionspublic:LED();~LED();void initLED(volatile uint8_t *port, volatile uint8_t *dirport, uint8_t pin);//Setup port and pin for LED usevoid on(void);void off(void);protected:private:LED( const LED &c );LED& operator=( const LED &c );And here is the code for the class:Code:#include "LED.h"// default constructorLED::LED(){} //LEDvoid LED::initLED(volatile uint8_t *port, volatile uint8_t *dirport, uint8_t pin){*ledPort=*port;ledPin=pin;*dirport |= (1<<ledPin);}void LED::on(void){*ledPort |= (1<<ledPin);}void LED::off(void){*ledPort &= (1<<ledPin);}// default destructorLED::~LED(){} //~LEDHere i'm trying to keep in the function the address of PORTB so I can use it on the led::on and led::off members. The led::iniLED is called from the main function.Is this correct?EDIT:The blinking was not working, but by changing: *ledPort=*port; to ledPort=port; on the initLED function the blinker works.

author: sleemanj
author_rank: Super Contributor
timestamp: February 28, 2017, 01:35:34 am
content: Edit: you solved it between me starting to type and posting the reply, will leave here as an explanation anyway> *ledPort=*port;In english, ' Copy the data stored at the memory address pointed to by "port", and put it into the memory address pointed to by "ledPort" 'I don't think that is what you intended to do, which is probably just "ledPort = port;" - point ledPort to the same memory address as port is presently pointing to.Other than that nothing jumps out at me.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: February 28, 2017, 07:11:16 am
content: A port could be class too....
Dumb question about AVR pullups - Page 1
Forum section: electronics / general

author: Dan Moos
author_rank: Frequent Contributor
timestamp: February 27, 2017, 04:24:26 am
content: So say I set a particular pin as an input, and, and activate that pin's internal pullup.Is there anything bad that could happen if a HIGH signal is sent to that pin, such that it's getting 5 volts from two sources at once?Related question. Let's say I don't enable the internal pullup. The MCU can still read the pin even if it's tri-stated, right?App specific question. I'm gathering input with a 74HC165 shift register. I'm not confident how to properly set up the MCU pin that gets the serial output from the shift register. My gut says no internal pullup, but I'm not sure.Sent from my E6830 using Tapatalk

author: ataradov
author_rank: Super Contributor
timestamp: February 27, 2017, 04:37:52 am
content: The voltage will still come from the same source - your power supply.There is no harm having a pull-up, especially given that it is pretty weak. If connected device do drive the line, then there is no need for it, however.

author: Dan Moos
author_rank: Frequent Contributor
timestamp: February 27, 2017, 04:42:42 am
content: Ah, good way to put it. If I use the internal pullup, and my shift register sends it HIGH, its the equivalent of just using two parallel resisters from Vcc as a pullup, which is obviously harmless if you think about it that way.Is there an accepted standard practice to this? In other words, are there pros and cons to using/not using the internal pullup?

author: ataradov
author_rank: Super Contributor
timestamp: February 27, 2017, 04:45:31 am
content: If your driving device always actively drives its output, then no pull-up is needed. 74HC165 has no way of making any of its outputs tri-state, so it can be used without a pull-up.

author: Dan Moos
author_rank: Frequent Contributor
timestamp: February 27, 2017, 04:50:08 am
content: Right on. Thanks as usual. I've just never thought about the consequences of using one or the other setting. All is clear now!

author: bobaruni
author_rank: Regular Contributor
timestamp: February 27, 2017, 05:55:05 am
content: There is no harm in using a pull-up with an active device except that there will be slightly more current consumption when the active output is low, this should be avoided if you are trying to conserve battery power.

author: MagicSmoker
author_rank: Super Contributor
timestamp: February 27, 2017, 01:16:15 pm
content: One other thing to keep in mind is that all I/O pins go Hi-Z (tri-state) during power on and reset; you can get into a lot of trouble with output pins, especially, if there isn't an external resistor to define their state.

author: Ian.M
author_rank: Super Contributor
timestamp: February 27, 2017, 02:39:40 pm
content: If you are using SPI slaves that can tristate MISO when deselected, then a pullup on that line would be a good idea so it isn't floating between data blocks.