hybridfree/eevblog-posts huggingface dataset:
CRC DMA PIC32 - Page 1
Forum section: electronics / general

author: Milan
author_rank: Contributor
timestamp: April 28, 2014, 12:45:02 am
content: Hello,is this right way to calculate CRC 16?Calculation results on PIC and PC are not sameCode:extern BYTE Buffer;unsigned int DmaDoCrcExample(void){unsigned int hwCrc;int chn=2;DmaTxferRes res;mCrcConfigure(0x11021, 16, 0xffff);res = DmaChnMemCrc(&hwCrc, Buffer, sizeof(Buffer), chn, DMA_CHN_PRI2);if(res!=DMA_TXFER_OK)return 0; // DMA calculation failedreturn hwCrc;}Milan

author: miguelvp
author_rank: Super Contributor
timestamp: April 28, 2014, 01:44:24 am
content: From another post I replied a long ago:All you want to know about CRC algorithms with many different implementations and approaches:http://www.csm.ornl.gov/~dunigan/crc.htmlAnother link of someone's implementation for embedded systems based on that paper linked above:http://www.barrgroup.com/Embedded-Systems/How-To/CRC-Calculation-C-Code

author: abyrvalg
author_rank: Frequent Contributor
timestamp: April 28, 2014, 10:53:43 am
content: Check that following things in PC code match your PIC setup: polynomial (there are other possibilities than 0x1021), initial value (some code uses 0, some 0xFFFF), final inversion - any difference in these things will produce different results.

author: miguelvp
author_rank: Super Contributor
timestamp: April 28, 2014, 03:39:28 pm
content: Quote from: abyrvalg on April 28, 2014, 10:53:43 amaha! You found it!mCrcConfigure(0x11021, 16, 0xffff);Btw values for CRC CCITT is 0x1021 for CRC-16 is 0x8005

author: Milan
author_rank: Contributor
timestamp: April 28, 2014, 06:55:05 pm
content: @miguelvp@abyrvalgThanks for help.Best RegardsMilan

author: Milan
author_rank: Contributor
timestamp: April 28, 2014, 08:36:39 pm
content: After two days I decided to stop trying to make HW CRC working.I decide to use SW CRC on both sides, It is not efficient but it works.If someone have idea how to set up HW CRC I will be thankful.Best RegardsMilanCode:UINT16 Calc_CRC_C_ARC(BYTE *Buff, UINT16 Len){int i = 0;UINT16 crc = 0xFFFF;UINT counter = 0;UINT16 polynomial = 0xA001;for(counter=0; counter<Len; counter++){for (i = 0; i < 8; i++){BIT bit = ((Buff >> (7 - i) & 1) == 1);BIT c15 = ((crc >> 15 & 1) == 1);crc <<= 1;if (c15 ^ bit) crc ^= polynomial;}}crc &= 0xffff;return crc;}

author: abyrvalg
author_rank: Frequent Contributor
timestamp: April 29, 2014, 10:01:38 am
content: Milan, can you post some sample data? Input buffer contents and hw crc result. I can try guessing the parameters for PC side code.For sw way there is more efficient table-based approach that works on bytes instead of bits. Seehttp://lxr.free-electrons.com/source/include/linux/crc16.hhttp://lxr.free-electrons.com/source/lib/crc16.cThat table is for 8005 (IBM) polynomial, but it's easy to find 1021 (HDLC) version.
XC6SLX9 XCF04 design - Page 1
Forum section: electronics / general

author: asadi.siyavash
author_rank: Contributor
timestamp: May 01, 2014, 09:08:23 pm
content: Hi,I'm new with xilinx FPGA before this project I designed Altera FPGA's like cyclone II and III without any problem. but now my Spartan 6 design doesn't work. I attached my schematic. when I scan JTAG it said no hardware connected.I have these questions:1.is the connection of JTAG right? I draw it like "Spartan-6 FPGA Configuration Guide"2.my oscillator doesn't work very well! it has 1volt offset and also it peak to peak voltage is 1 volt?3.all of FPGA PIN are high! I changed my FPGA but it was high too.I am really confused please help me it is urgent.excuse me for my bad english.
Arduino  Step Sequencer Help - Page 1
Forum section: electronics / general

author: proschuno
author_rank: Contributor
timestamp: April 25, 2014, 01:08:21 am
content: Alright, so this is my first project involving a micro controller, and programming, in which I am using an Arduino Uno to build a step sequencer for a modular synthesizer system. The idea is that it uses pins 2 thru 9 to generate the steps, in which these steps will be brought out to opamps which will be set up as non-inverting amplifiers, which will generate a control voltage that can be varied using a pot on the op amps.I already have it stepping, however I would like to extend the number of steps beyond 8, and would like to involve the other pins 10-13 to extend the number of steps possibly to 32, and I have uploaded a wiring diagram showing pins 2 and 3, but imagine this extending to pin 9. For the first 8 steps, 10 will be held HIGH (and pins 11-13 LOW) through the AND gates attached to each opamp (not showing the exact wiring; explained above). Once these 8 steps complete, 10 will go low with pins 12 and 13, and 11 will go high, 8 steps later, 12 goes high, so on and so forth, then once 13 is done it will go back to 10. I have no idea how to code this little part.Here is the code I already have (which was copied and pasted from a sketch made to run single 7 segment displays), all this does is just make the 8 steps, the speed of each step which can be varied with a pot's wiper attached to Analog in 0.byte sequence = { { 1,0,0,0,0,0,0,0 }, // = 0{ 0,1,0,0,0,0,0,0 }, // = 1{ 0,0,1,0,0,0,0,0 }, // = 2{ 0,0,0,1,0,0,0,0 }, // = 3{ 0,0,0,0,1,0,0,0 }, // = 4{ 0,0,0,0,0,1,0,0 }, // = 5{ 0,0,0,0,0,0,1,0 }, // = 6{ 0,0,0,0,0,0,0,1 }, // = 7// = 9};int sensorValue = 0;int sensorPin= A0;void setup() {pinMode(2, OUTPUT);pinMode(3, OUTPUT);pinMode(4, OUTPUT);pinMode(5, OUTPUT);pinMode(6, OUTPUT);pinMode(7, OUTPUT);pinMode(8, OUTPUT);pinMode(9, OUTPUT);pinMode(10, OUTPUT);pinMode(11, OUTPUT);pinMode(12, OUTPUT);pinMode(13, OUTPUT);}void sequenceWrite(byte digit) {byte pin = 2;for (byte seqCount = 0; seqCount < 8; ++seqCount) {digitalWrite(pin, sequence);++pin;}}void loop() {for (byte count = 8; count > 0; --count) {sensorValue = analogRead(sensorPin);delay(sensorValue+10);sequenceWrite(count - 1);}}I'm sure this isn't the really most efficient way to do what I'm doing, but it appears to be simple enough for me to understand, and I've really been wanting to teach myself programming, so I figured this would be a stylish way to do it.

author: Hideki
author_rank: Frequent Contributor
timestamp: April 25, 2014, 09:48:00 am
content: This will be easier to do with shift registers. There are many examples of there of how to connect something like 74HC595 to the Arduino to get more outputs in steps of 8 per chip.Your opamp solution connected the way you picture will only be able to increase the gain, and not make the output variable from 0 to "some maximum voltage".Place the pot before the opamp and use the opamp like a buffer -- with gain if you need that.
Arduino Step Sequencer tweaking - Page 1
Forum section: electronics / general

author: proschuno
author_rank: Contributor
timestamp: April 24, 2014, 12:54:34 am
content: My goal is to try and build a basic step sequencer for synthesizers that generates a series of control voltages in a timed sequence. The heart of this is an Arduino I'm using, which involves turning one output pin at a time, leaving the others of, such that the pulses form a traveling sequence. The speed of each pulse is controlled by a pot's wiper connected to the Analog pin 1. The steps start from pin 9 and go to pin 2A problem I'm having is that when I adjust it in large increments, the Arduino will usually stick in the previous speed, and it will take a little while to change its beat. Here is the coding for it:byte seven_seg_digits = { { 1,0,0,0,0,0,0,0 }, // = 0{ 0,1,0,0,0,0,0,0 }, // = 1{ 0,0,1,0,0,0,0,0 }, // = 2{ 0,0,0,1,0,0,0,0 }, // = 3{ 0,0,0,0,1,0,0,0 }, // = 4{ 0,0,0,0,0,1,0,0 }, // = 5{ 0,0,0,0,0,0,1,0 }, // = 6{ 0,0,0,0,0,0,0,1 }, // = 7// = 9};int sensorValue = 0;int sensorPin= A0;void setup() {pinMode(2, OUTPUT);pinMode(3, OUTPUT);pinMode(4, OUTPUT);pinMode(5, OUTPUT);pinMode(6, OUTPUT);pinMode(7, OUTPUT);pinMode(8, OUTPUT);pinMode(9, OUTPUT);}void sevenSegWrite(byte digit) {byte pin = 2;for (byte segCount = 0; segCount < 8; ++segCount) {digitalWrite(pin, seven_seg_digits);++pin;}}void loop() {sensorValue = analogRead(sensorPin);for (byte count = 8; count > 0; --count) {delay(sensorValue+5);sevenSegWrite(count - 1);}}I just copied this off another program designed to run single 7 segment displays, and just adjusted it a little bit until I got it to do what I wanted. However, what exactly should I do to get it to respond more readily to changes in the input analog voltage?And last, this is my real first Arduino project, so I have hardly any idea how to program, but could someone explain to me how the after the "Void sevensegwrite" part of the code works?

author: Hideki
author_rank: Frequent Contributor
timestamp: April 24, 2014, 01:45:20 am
content: Move analogRead inside the loop. Right now you're only checking the pot once at the beginning of the sequence, so it doesn't matter how much you turn it while it's in the middle of it - the speed will only be updated at the start.
vhdl, could i adapt this dummy WB dram interface to a bram ?  - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: April 28, 2014, 08:10:53 pm
content: Code:-- Including librarieslibrary IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;-- Including dependencieslibrary work;use work.softcore_pkg.all;entity wb_sram isport(clk: in std_logic;reset: in std_logic;interrupt: out std_logic;slave_in: in wb_master_out;slave_out: out wb_master_in;-- onboard SRAM1 (ISSI 256Kx16 SRAM, 10ns)ad: out std_logic_vector (17 downto 0); -- address bus (18 Bit)we_n: out std_logic; -- write enableoe_n: out std_logic; -- output enabledio_a: inout std_logic_vector (15 downto 0); -- data bus (16 Bit)ce_a_n: out std_logic; -- chip enableub_a_n: out std_logic; -- upper byte enablelb_a_n: out std_logic -- lower byte enable);end wb_sram;architecture behave_wb_sram of wb_sram isconstant ADDR_W: integer:=18;constant DATA_W: integer:=16;signal addr: std_logic_vector (ADDR_W - 1 downto 0);signal data_f2s: std_logic_vector (DATA_W - 1 downto 0);signal data_s2f: std_logic_vector (DATA_W - 1 downto 0);signal mem: std_logic;signal rw: std_logic;signal data_reg: std_logic_vector (DATA_W - 1 downto 0);begin-- Interrupt not used, tie it to 0interrupt <= '0';-- The slave acknowledge is set by the cyc signalslave_out.ack <= slave_in.cyc;-- The slave data to be sent via the wishbone bus to the CPU are set with the read SRAM data-- Because the data width of the SRAM is only 16 bit the other 16 bit are tied to 0slave_out.data (31 downto DATA_W) <= (others => '0');end behave_wb_sram;hi guysthe code is about a dummy WB interface to a RAM controller which interface the soft core to a DDR ram of 256Kword. I'd like to implement this soft core on Spartan s3e 500 breakout board which has no dram, i'd like to use the BRAM (which is included inside the fpga), and i have resources enough to have 32Kbyte of BRAM available.The question is: can i adapt this WB interface to interface bram instead ? I aim for minimal impact to the vhdl code of the SoC.

author: nctnico
author_rank: Super Contributor
timestamp: April 28, 2014, 10:54:49 pm
content: I think this is relatively easy to do. There is a package to create a dual port wishbone memory from blockrams. That should be a drop-in replacement.

author: legacy
author_rank: Super Contributor
timestamp: April 29, 2014, 12:22:12 am
content: perfect, thank you =)
Switching between tri-state (input,no pull-up) and output high without tmp state - Page 1
Forum section: electronics / general

author: eneuro
author_rank: Super Contributor
timestamp: April 24, 2014, 06:25:02 pm
content: Hello,I'd like to ensure that by enabling PUD bit in the MCUCR register in AVR (ATTiny85 Ports I/O part datasheet attached) I will be able to switch between tri-state (input, no pull-up) and output high without temporary intermediate state with either pull-up enabled or output low.If trying to switch to output high while in tri-state input and no pull-up (DDxn,PORTxn): (0,0) I can do it this way I hope:(0,0): set PUD to 1 im MCUCR - I should be in tri-state while this X mark in table 10-1 shows something like this(0,1): set PORTxn to 1 - there should be no pull-up while PUD is enabled(1,1): set direction bit to 1, so now I have this pin configured as output high.(0,1) When I clear direction bit to 0 (with PUD still enabled) I should swith to input tri-state and no pull-up, so this means if it were any external pull down on this pin it will stop source current?It is not clear for me this sentence from this datasheet with PUD seting in MCUCR to disable all pull-ups in all ports.I can do it, while there is a point in program flow, where all pins can be in tri-state input (no internal pull-up), and then I need 2 of them set to either output high or low, but without any internal pull-up or low state on one of them going high.Of course I will test it, but in theory this sequence with PUD enabled should do the trick or I missed something?
Texas Instruments TMS-GANG programmer - Page 1
Forum section: electronics / general

author: Richard Head
author_rank: Frequent Contributor
timestamp: April 16, 2014, 10:30:01 am
content: I've just ordered an MSP-GANG programmer from TI. It can program up to 8 devices simultaneously.I wonder if anyone else has used this device before and can share their experiances.Thanks in advance.Dick

author: theatrus
author_rank: Frequent Contributor
timestamp: April 16, 2014, 03:51:26 pm
content: I've used the MSP430-GANG before, and it worked well. The "push button" mode where the firmware is stored on the device was nice. In stand-alone mode, the error reporting was possibly too simplistic (its just a red LED). The only thing to watch out for is cable lengths - the MSP430 one had signal integrity issues which were hard to trace down as wire lengths increased.

author: Richard Head
author_rank: Frequent Contributor
timestamp: April 17, 2014, 07:40:59 am
content: TheatrusThanks for the reply.I do intend to use it in stand alone mode as it"ll be used on a production line with no PC connection. The intention is to program 8 units at a time.I"ll try to keep the ribbon cable lengths as short as possible. Probably about 1m (3ft) max.I would also like to be able to use it for software upgrades in the field. I wonder if it has an internal battery or just a DC power plug?Dick

author: theatrus
author_rank: Frequent Contributor
timestamp: April 19, 2014, 10:45:55 pm
content: No battery, just a 9-12VDC wallwart required. You can configure to provide power to the circuit or not.
software for STM32F4DISCOVERY Evaluation Kit - Page 1
Forum section: electronics / general

author: Kappes Buur
author_rank: Regular Contributor
timestamp: April 18, 2014, 11:40:12 pm
content: I've been using the Arduino platform so far.But lately the STM32F4DISCOVERY Evaluation Kit caught my eye.Is there any good, free IDE available for it ?

author: miguelvp
author_rank: Super Contributor
timestamp: April 18, 2014, 11:52:51 pm
content: Their datasheet mentions to look in:www.st.com/stm32f4-discoverybut it redirects to some something not too obvious that takes you back to their producthttp://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419but they have documentation and feature videos, no idea what toolchain they use or if it's free.Or maybe one of those tick marks on the first url is the download link, not obvious at all

author: jancumps
author_rank: Unknown
timestamp: April 18, 2014, 11:53:27 pm
content: Hey, that's almost for free (18.13€ vat included + posting here in Belgium).For ARM fiddling, I use TI's Hercules launchpad. I have the one with TMS570LS04 ARM R4 µC.It doesn't have the same variety of sensors that the ST evaluation kit has. But I'm a TI fanboy.

author: pablintino
author_rank: Contributor
timestamp: April 18, 2014, 11:53:38 pm
content: Look this thread:https://www.eevblog.com/forum/index.php?topic=27880.0
Measuring 3 Channel PWM Signal Duty Cycle - Page 1
Forum section: electronics / general

author: Prayer
author_rank: Contributor
timestamp: March 06, 2014, 04:51:07 pm
content: Hi AllI want to measure PWM output of RGB controller with STM8S105 @16Mhz internal oscillator. The PWM signals are phase align and PWM signal frequency is 500 Hz.. PWM signal duty is changing between 0% and 100%. System start 0%, 100% or any value between 0% and 100%.I connected TIM1 Channel1 and Channel2 to Red_PWM, TIM1 Channel3 and Channel 4 to Green_PWM channels. I can catch all values when I apply a input PWM. If I apply second or third channel or all of them, I can not catch 2-3% PWM each channel. I read random variables.I think that is cause from resetting TIM1 counter (TIM1_SetCounter(0x00)but I didn't handle. Could anyone suggest a solution ?Code:INTERRUPT_HANDLER(TIM1_CAP_COM_IRQHandler, 12){/* In order to detect unexpected events during development,it is recommended to set a breakpoint on the following instruction.*/if((TIM1->SR1 & TIM1_FLAG_CC1) == TIM1_FLAG_CC1){TIM1_ClearFlag(TIM1_FLAG_CC1);if(bCapture1_Rising == FALSE){bCapture_Timer_Reset = TRUE;bCapture1_Rising = TRUE;}else{wRed_Period = TIM1_GetCapture1();wRed_PWM = (100 * (DWORD)wRed_On_Time) / wRed_Period;bCapture_Timer_Reset = TRUE;wRed_OVF_Flag = 0;}}if((TIM1->SR1 & TIM1_FLAG_CC2) == TIM1_FLAG_CC2){TIM1_ClearFlag(TIM1_FLAG_CC2);wRed_On_Time = TIM1_GetCapture2();}if((TIM1->SR1 & TIM1_FLAG_CC3) == TIM1_FLAG_CC3){TIM1_ClearFlag(TIM1_FLAG_CC3);if(bCapture2_Rising == FALSE){bCapture_Timer_Reset = TRUE;bCapture2_Rising = TRUE;}else{wGreen_Period = TIM1_GetCapture3();wGreen_PWM = (100 * (DWORD)wGreen_On_Time) / wGreen_Period;bCapture_Timer_Reset = TRUE;}}if((TIM1->SR1 & TIM1_FLAG_CC4) == TIM1_FLAG_CC4){TIM1_ClearFlag(TIM1_FLAG_CC4);wGreen_On_Time = TIM1_GetCapture4();}if(bCapture_Timer_Reset == TRUE){bCapture_Timer_Reset = FALSE;TIM1_SetCounter(0x00);}}

author: Jeroen3
author_rank: Super Contributor
timestamp: April 12, 2014, 06:45:17 pm
content: Then don't reset the timer, there is no need for that.Code:uint32_t a = capture;uint32_t b = prev_capture;uint32_t delta;const uint32_t max = 0xFFFFFFFF;if(a > b)delta = a - b;elsedelta = max - b + a;
Test Bench first approach - Page 1
Forum section: electronics / general

author: TonyStarkPE
author_rank: Newbie
timestamp: April 10, 2014, 09:50:15 am
content: I was wondering on the outcomes of doing a test bench before implementation for an (VHDL, Verilog, etc) project. Is this feasible for a hierarchical project with a number of files? What are other more efficient test-driven approaches to a FPGA project?
Silicon Labs - Page 1
Forum section: electronics / general

author: eurofox
author_rank: Unknown
timestamp: April 03, 2014, 07:33:27 am
content: Interesting tools to download.http://www.silabs.com/products/mcu/pages/simplicity-studio.aspxeurofox

author: dannyf
author_rank: Super Contributor
timestamp: April 03, 2014, 10:55:45 am
content: A gigabyte download to support a few mcus? No thanks.I think Keil 5.0 got it right: use modular download on an as-needed basis.

author: neslekkim
author_rank: Super Contributor
timestamp: April 06, 2014, 11:40:49 am
content: You can select what you need to install, I instaled only for the c8051f99x family, no problem with that, everything, studio and stuff for 680MB.As an bonus you got an offline parametric search for all mcu's from silabs.

author: dannyf
author_rank: Super Contributor
timestamp: April 06, 2014, 11:58:42 am
content: 680MB is still a lot of space for those 8051 parts. The old ide (16.0) is only 15MB, for all of their 8051 parts.

author: digsys
author_rank: Unknown
timestamp: April 06, 2014, 12:22:59 pm
content: As others have pointed out, just install the modules you really need. It is easy to get caught out on some bloated options.When it happened to me, I manually filleted the install :-)I'm just happy they finally gave us a FREE extensive Keil / Silabs IDE a year or so ago. That 2K/4K limit sucked !
LCD libraries STM32 - Page 1
Forum section: electronics / general

author: pranay singh
author_rank: Newbie
timestamp: March 28, 2014, 02:42:13 pm
content: Can someone please recommend a LCD touchscreen display which have some sort of library support available for the stm32f10xx series.Thanks !

author: dannyf
author_rank: Super Contributor
timestamp: March 28, 2014, 03:17:45 pm
content: Simple 3 steps:1. google stemwin;2. get it work for your chip;3. done!

author: pranay singh
author_rank: Newbie
timestamp: March 29, 2014, 10:50:21 am
content: Sadly none of the controllers that the Stemwin supports are accessible to me. I'll have to write a driver for the LCD which is a real pain.Do you know of any good tutorials on how to write a driver ?Thanks

author: dannyf
author_rank: Super Contributor
timestamp: March 29, 2014, 03:44:00 pm
content: The lcd's datasheet would be your best bet.

author: ohmineer
author_rank: Contributor
timestamp: March 29, 2014, 04:29:08 pm
content: Do you already have the LCD module?I am not an expert but, in my last project, I easily found some examples googling for the particular LCD module and STM32.If you do not have the product yet, here are some places were the seller can provide you with the driver (No warranties, though).http://www.hotmcu.com/32-touch-screen-tft-lcd-with-16-bit-parallel-interface-p-36.html?cPath=6_16http://www.wvshare.com/column/LCD_Module.htm

author: electrodacus
author_rank: Super Contributor
timestamp: March 30, 2014, 01:58:34 am
content: Wait for my project to be open source. You can help if you contribute to my KickstarterI use STM32F050 and the Nokia 5110 LCD + you also have capacitive buttons and a nice user interface that I made.Here is a 3D render of my Solar BMS

author: baoshi
author_rank: Regular Contributor
timestamp: April 02, 2014, 03:16:01 pm
content: I wrote a blog post showing how to write a display driver for STemWin.http://www.ba0sh1.com/write-a-display-driver-for-emwin/

author: Electronicreator
author_rank: Newbie
timestamp: April 04, 2014, 11:10:47 pm
content: There is the stm32f429i that I use for my multimedia development. I's cheap, easy to use, and comes with the st link emulator included in the board + an arm cortex m4 microcontroller and some external ram.
CAN Message extended id filtering - Page 1
Forum section: electronics / general

author: ganeshredcobra
author_rank: Newbie
timestamp: April 21, 2014, 10:50:21 am
content: Hi,I am trying to implement CAN Extended Message ID Filtering.The code i tried is given below its not accepting the ID. What will be the issue?I am using PIC18F25K80 and PIC C18 Compiler. I am trying to get the id "FFFF"RXF0EIDL = 0xFF;RXF0EIDH = 0x00;RXF0SIDL = 0xE8;RXF0SIDH = 0x1F;

author: matkar
author_rank: Regular Contributor
timestamp: April 23, 2014, 08:00:46 am
content: It is not clear what your problem is.Are you able to receive CAN messages if you don't use filtering?What are the values of CAN mask registers?Do you use Mode 0 or Mode 1/2?
FPGA and Audio Signal Processing - Page 1
Forum section: electronics / general

author: OpenglMan
author_rank: Newbie
timestamp: April 01, 2014, 11:32:57 pm
content: According to the subjet, I would like to practice with FPGAs and audio signal processing.Could you tell me any good book, tutorial or web about it ?, I have an Altera Cyclone II development board.

author: hamster_nz
author_rank: Super Contributor
timestamp: April 01, 2014, 11:51:41 pm
content: What sort of DSP are you interested in? filtering, audio effects or signal processing?If you are interested in Audio effects then have a look at secotion 3.3.6 ofhttp://www.digilentinc.com/events/Common/Report%20Sample%20~%20DigitalSynth%20Report.pdfto get some ideas.However, if you are a newbie at DSP, if you only read one book on DSP make it "The Scientist and Engineers guide to Digital Signal Processing". A large part of it is available at no cost on the web athttp://www.dspguide.com/pdfbook.htmI never understood how the Discrete Fourier Transform actually worked until I read this book.All the examples in the book are in BASIC (yes! BASIC) so how hard can that be to implement in an FPGA?You can find a FIR filter implemented in VHDL athttp://hamsterworks.co.nz/mediawiki/index.php/FIR_Filterif you want a canned base to work from.But actually implementing the filter isn't the question - it is understanding how it works its magic is far more interesting than building one.It is a bit like wiring an OpAmp, a few Caps and a few resistors and building a filter. The interesting stuff is in how it works!
Windows on Devices - Page 1
Forum section: electronics / general

author: miguelvp
author_rank: Super Contributor
timestamp: April 02, 2014, 08:47:19 pm
content: I already checked, it wasn't an April Fools joke.http://www.windowsondevices.com/windows embedded!Since I have the Galileo already I guess I should try it. After all I got my wife a Dell Venue 8 Pro tablet and is very capable on the Atom, so the Quark should do good.I just wished Microsoft re-branded the whole RT and dropped the Windows part of the name, like they did with the Xbox

author: miguelvp
author_rank: Super Contributor
timestamp: April 02, 2014, 11:43:15 pm
content: By the way, I think it silly because they don't have a light weight OS so the resources needed add a lot of cost, but it's kind of weird that they want to get in the maker space.they have a long road ahead to be practical in my oppinionn

author: Rigby
author_rank: Super Contributor
timestamp: April 03, 2014, 02:51:24 am
content: Windows Embedded Compact can run on pretty light hardware... I've seen headless setups going on just a few tens of MHz of CPU.
Freescale DSP Question! - Page 1
Forum section: electronics / general

author: angelothewolf
author_rank: Contributor
timestamp: March 31, 2014, 11:16:34 pm
content: Hi there, im attempting to fix a NORD Electro 2 wich is a keyboard. I found a loose screw inside the unit and one of the two DSP chips shorting the 3.3v rail and getting very hot...So im planning to replace both DSP chips. The thing is that the exact chip (DSPB56362PV120) is no longer available, but Mouser have the DSPB56362AG120, so i couldnt figure out what the difference in the termination letters means (PV120 & AG120) the data sheet is the same for both chips.Did you think that this replacement will work???thanks!http://www.electronicsdatasheets.com/download/3853.pdf?format=pdf

author: AndreasF
author_rank: Frequent Contributor
timestamp: April 01, 2014, 05:39:05 am
content: According to Freescale's website the AG version is a fully pin and functional compatible version to the PV version (seehere)

author: angelothewolf
author_rank: Contributor
timestamp: April 01, 2014, 12:33:40 pm
content: Thank you very much!!
TL866CS Programmer, again? - Page 1
Forum section: electronics / general

author: mikew8760
author_rank: Contributor
timestamp: March 29, 2014, 06:17:34 pm
content: I have been using this programmer for a few months, and tried out all its bells and whistles without any problem. I have now attempted to program a PIC 18F2520 and met with the first failure. Briefly, although the TL866 reports that the programmed code has verified as OK, a subsequent verification fails, showing some bytes as being 0x00. Curiously, all these bytes are on "page" boundaries, e.g. at 0x00, 0x100, 0x400. I suspect this is a timing problem, and may be peculiar to the 18F programming algorithm. However, I am at a loss to think of any way that this behaviour can be confirmed or how to correct it. Incidentally, this behaviour is shown with two 18F2520 pics.I would be interested to know if any else has had any problems with this programmer?
sample code : interface wavecom M1306B module - Page 1
Forum section: electronics / general

author: A2
author_rank: Contributor
timestamp: March 27, 2014, 04:03:39 am
content: Is there any sample code available on how to interface wavecom module with the microcontroller ,I have to write sms & send command to module which will send sms to further mobile.Datasheet:http://www.mobitek.com.my/GSM_Modem/Fastrack_M1306B_User_Guide_rev003.pdf

author: Harvs
author_rank: Super Contributor
timestamp: March 27, 2014, 09:11:02 am
content: Really sample code for these sorts of things aren't going to help you, because it's pretty much as abstracted as you're going to get.It's just a serial interface and the standard AT command set.Whenever dealing with these sorts of things, I just get the AT command guide (a link is in that datasheet you listed), hook it up to a serial port on a PC, open a terminal application and start typing commands to it. It's all human readable ascii, so you should be able to work out pretty quick what series of commands you need to achieve what you need.Then just write your software to handle those commands in a state machine (or separate thread if you're on a multithreaded environment.)
Need help picking a adc - Page 1
Forum section: electronics / general

author: MarkoAnte
author_rank: Regular Contributor
timestamp: April 04, 2014, 08:17:02 am
content: Hi,my task is: Make a regulation system using a fpga. I already have the most of the program written, but now I need to measure the (current) voltage and make adjustments - this would need to take place quite fast(eg. more then 500 khz). What adc would you suggest?I would prefer a parallel 10 bit (or more), 500ksps (or more) adc with preferably differential inputs (2 or more), the easier to use the better (eg no internal registers to set), and high analogue in voltage 5v or something like that (what I found is max 2v in and I'm concern about the stability of those 2 V in a industrial environment- now we work with 15V).

author: mrflibble
author_rank: Super Contributor
timestamp: April 04, 2014, 10:00:06 am
content: Don't have a ready to go part number for you, but for this type of thing I find TI's parametric search pretty handy:http://www.ti.com/lsds/ti/data-converters/precision-adc-less-10msps-products.page

author: pa2ees
author_rank: Contributor
timestamp: April 04, 2014, 01:44:40 pm
content: I always jump on digikey and use their parametric search to find something that fits my needs. looks like analog, ti, and maxim are the only three that have something along the lines of what you are looking for.- Erik

author: MarkoAnte
author_rank: Regular Contributor
timestamp: April 04, 2014, 03:05:20 pm
content: Ty for the feed back but I found something that might work.http://www.farnell.com/datasheets/77508.pdfAnd I will run 2 on the same bus with 2 clk edges apart in their sample period and they should be ok and you also can increase the refrance voltage to max 5v - max impute voltage(but they don't guarantee accuracy- some testing is in order) .
Nokia5110 LCD (PCD8544 controller) with PIC18F4550 - Page 1
Forum section: electronics / general

author: Bibiricat
author_rank: Contributor
timestamp: March 25, 2014, 01:08:33 pm
content: Hello.I just bought a Nokia5110 LCD and i was trying to interface it with a pic18f4550, but i can't find any example code to use with C18 or Hytech C compilers, as most of the results are with arduino or old broken links.Does anyone have some example code for PIC mcu's ? Any example code would do.

author: dannyf
author_rank: Super Contributor
timestamp: March 25, 2014, 01:13:28 pm
content: Don't find sample code. Find the datasheet for your lcd / chip and write code to drive it.

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 25, 2014, 01:49:10 pm
content: Quote from: Bibiricat on March 25, 2014, 01:08:33 pm@Danny is right find the datasheet then get some coffee/tea and watch this while reading the datasheet.Arduino Nokia 5110 LCD Tutorial #1 - Connecting and Initial ProgrammingNote ignore the Arduino title, you can port the code after understanding the abstract. I found this LCD more fun and easy than HD44780U controllers.Note if you bought it off ebay, the video says it will work from 5V or 3.3V, but I had a different experience the batch I have seems to only work off 3.3V, I tested a batch of 5 pieces (with the blue back light).

author: andyturk
author_rank: Frequent Contributor
timestamp: March 25, 2014, 03:19:25 pm
content: Quote from: Bibiricat on March 25, 2014, 01:08:33 pmHere's my attempt:pdc8544.hpdc8544.ccIt's C++, but may be useful anyway.
Any protocol for sending data from USB oscilloscope to PC ? - Page 1
Forum section: electronics / general

author: jayfree
author_rank: Newbie
timestamp: March 22, 2014, 07:07:41 am
content: I am designing an USB oscilloscope using my TI TIVA Launchpad. I want to send the ADC samples via USB to my PC. I have some doubts regarding sending data from micrccontroller to my PC.1) Is there a protocol available for sending data from micrccontroller to PC ? For a logic analysers, I have seen a protocol(which uses UART)http://www.sump.org/projects/analyzer/protocol/2) Is it enough to just send the samples from microcontroller to PC ? Or do I have to send the time stamps of each samples received along with the ADC value to the PC to accurately display on my PC ?3) How is the timing accuracy achieved while displaying on the computer screen i.e how can we measure a signal timing parameters accurately ? I would like to get a good accuracy when I view on my PC.How is the timing displayed in micro seconds time scale as shown in below image?

author: abyrvalg
author_rank: Frequent Contributor
timestamp: March 22, 2014, 08:40:23 am
content: That depends on your mode of operation. If you just sample at some not so high preselected rate then you can have very simple protocol like this:Code:send "start sampling" messagereceive sample data continuouslysend "stop sampling" message when you have "enough" dataflush the receiver to drop the tail data that had arrived while you were "cooking" your "stop sampling" messageYou don't need any time stamps in this case - your timing is fixed, any Nth sample's time position is just N*sample_period - that's the case with LA you've posted: it samples at 24MHz continuously, so there is fixed 41.7ns step between samples.You'll need some time stamps only if your sampling is not 100% periodic, i.e. "segmented" capture with long dead time elimination on scope's side.
Cypress FX3 development kit? - Page 1
Forum section: electronics / general

author: jeremy
author_rank: Super Contributor
timestamp: March 19, 2014, 09:19:36 am
content: Hi all,I'd really love to get a board that has two things on it: a cypress FX3 and an FPGA. Does such a beast exist?On top of this, are there any modules that break out the horrid BGA package into something more usable?

author: miguelvp
author_rank: Super Contributor
timestamp: March 19, 2014, 03:11:20 pm
content: According to this article, there is an BeUSB 3.0 from Arrow Electronics to be used with the BeMicro SDK Cyclone IV dev board.http://www.electronics-eetimes.com/en/usb-3.0-superspeed-interface-board-targets-altera-fpgas.html?cmp_id=7&news_id=222912957http://parts.arrow.com/item/detail/arrow-development-tools/beusb3.0#nJMGDo a search for 'BeUSB 3.0 Arrow' for tons of info about it since it's been out a couple of years I think.Edit: Just to make sure that you know that you'll need the BeMicro SDK that will cost you an extra $79 + shipping:http://parts.arrow.com/item/detail/arrow-development-tools/bemicrosdk#cJFySo total cost $228 and most likely their code uses the NiosII soft core processor, so for an actual production you will need to purchase the NiosII license, unless you write your own HDL that bypasses the NiosII or use your own soft core or an open one.Edit: more info, you can look at the instruction manual here:http://web.arrownac.com/sites/default/files/pdfs/BeUSB%203.0%20Instruction%20Manual.pdfAlso the sample code is available for download from nuvation without registration, seems that it does use a soft core but it has VHDL code for you to interact directly with the BeUSB 3.0, but I have not look at the code or tried to compile it. But a diagram on the manual it shows the BeUSB to be connected via QSYS IP so, not sure, download the stuff and look at it before you buy it.One thing in the manual, it states that it uses unsigned drivers so you have to read the manual to disable driver signature if you are running windows 7.
PIC32MX, WM8731 I2C problem - Page 1
Forum section: electronics / general

author: Woz
author_rank: Newbie
timestamp: February 12, 2014, 11:34:44 pm
content: Hi!I'm trying to play audio through a Wolfson WM8731 codec using a PIC32MX450F256L but I can't seem to get the I2C serial control interface to work.The WM8731 is using 7-bit register addresses and 9 control data bits per register.I'm trying to do the following:- Send device address + r/w bit (0x34).- When acknowledged, send 16-bits of data, 8-bit at a time (MSB first). B15-B8 is the register address + B8 of the data I want to write. And then send the remaining B7-B0 of data.The codec acknowledges the device address but it wont acknowledge the last byte of control data.I've added the code and a screenshot of what shows up in my logic analyzer. The code is based on a Microchip example. (Obviously it's the "codec_writeRegister"-function I can't seem to get correct.)I hope someone can help me with this, I've spent a looot of time on this.Thanks!

author: rfbroadband
author_rank: Unknown
timestamp: February 16, 2014, 03:56:46 am
content: simplify your your problem first- initialize I2C module- set baud rate register for desired speed of I2C(make sure peripheral divider reduces pclock to a freq. so the BRG register can configure the I2C clock speed.- I assume you know, that queuing of events is not allowed with the PIC I2C modules!That means, for example : if you write the slave address into the transmit register you need to check whether the register has been cleared before you send the next command! You can do this with interrupts or if you can 'waste' some clock cycles you constantly check the status register withwhile(I2CxSTATbits.TRSTAT != 0);I did not see anything in your code that indicates you made sure the registers were cleared before you sent the next command. I just found a few for loops and NOPs which I am sure will not work.I would suggest you carefully study the I2C Programming guide for the PIC32s, it contains every thing one usually needs....good luck

author: johnwill
author_rank: Contributor
timestamp: March 15, 2014, 09:47:14 pm
content: Hello, I also have problems with the I2C library. I have used the PICkit 2 as Logic analyzer, and see the clock instead of going at 100 kHz, goes at about 8 kHz (attached picture).Try to change all the values of I2C1BRG in the /PINGUINO/pinguinoX.2rev305/p32/include/pinguino/core/i2c.c file, but still the same problem.Thank you for some help!I am using:PIC32_Pinguino_OTG boardUbuntu 10.10Pinguino x.2 rev 305
FS: ChipCon 1100 + MSP430 development boards and debugger - Page 1
Forum section: electronics / general

author: engineer_in_shorts
author_rank: Regular Contributor
timestamp: March 10, 2014, 04:11:06 pm
content: Hi,I wouldn't normally put links to ebay here (and i am not sure it is within the 'selling rules'). However it is quite a hoard of CipCon CC1100 development bits and MSP430 development bits, that if someone is looking to do this at the m,moment they might want to grab the lot.ChipCon CC1100 related:http://www.ebay.co.uk/itm/151251197940http://www.ebay.co.uk/itm/151251204862http://www.ebay.co.uk/itm/151251225779MSP430-449 dev:http://www.ebay.co.uk/itm/151251210959http://www.ebay.co.uk/itm/151251219988Official MSP430 TI debugger:http://www.ebay.co.uk/itm/151251223882

author: engineer_in_shorts
author_rank: Regular Contributor
timestamp: March 11, 2014, 11:44:13 pm
content: I added some international postage options to the chipcon related stuff
Yes I finally did it - Page 1
Forum section: electronics / general

author: M0BSW
author_rank: Frequent Contributor
timestamp: March 07, 2014, 07:43:12 pm
content: I'm so pleased with myself, my wife thinks I've gone mad, I wrote a hex file, loaded it up to a pic chip and the bugger works, ok it's only flashing a led, but it's my first, racing towards 60 years old , it's made my day.I'll calm down now

author: dannyf
author_rank: Super Contributor
timestamp: March 07, 2014, 07:50:12 pm
content: QuoteYou are only a baby,Let's the fun begin!I am the opposite of you. I learned about mcus on some intel chips mcs-51 many moons ago. My biggest achievement then was to code transcoders with those chips for optical encoders that we sold to steel mills.Did nothing after that, and then I became an accidental shareholder in a friend's firm that specializes in providing design services for a particular niche where mcus are heavily used (mostly 32-bit mcus). I am still an unpaid employee of the firm allowing me access to tools and conferences, etc.Pretty happy getting back to mcus.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: March 07, 2014, 08:27:04 pm
content: Hey congrats! I just reached the same milestone and know how it feels. To me it was a lot better than buying a premade kit and taking the cookie-cutter approach. I compiled the binutils, the cross-compiler and the libc, plus the programmer (avrdude). My next thing will be to hook up the oscilloscope to various things on the breadboard just as an exploratory.

author: M0BSW
author_rank: Frequent Contributor
timestamp: March 07, 2014, 08:38:38 pm
content: Quote from: GiskardReventlov on March 07, 2014, 08:27:04 pmCongrats to you too, it's opened a whole new world for me, There are loads of amateur radio projects that use pic chips, :-happy days.

author: uwezi
author_rank: Unknown
timestamp: March 07, 2014, 08:41:01 pm
content: It was some time in the summer of 2010. Now I am teaching microcontrollers...Welcome to the club!

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 07, 2014, 08:51:31 pm
content: Quote from: GiskardReventlov on March 07, 2014, 08:27:04 pmwell, compiling all that is moon to earth milestones. congratulation!

author: Refrigerator
author_rank: Super Contributor
timestamp: March 07, 2014, 08:52:18 pm
content: Awesome! Can't wait to start loading programs to my mcus when i get them.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: March 07, 2014, 09:33:19 pm
content: Quote from: Mechatrommer on March 07, 2014, 08:51:31 pmIn case someone needs to know one issue with gcc was that I tried to build it in the source tree. Instead it's required to do this:cd gccmkdir mybuild../configuremake
PIC18F25K20 is resetting when MCLR is floating (MCLRE = OFF) - Page 1
Forum section: electronics / general

author: npelov
author_rank: Frequent Contributor
timestamp: March 07, 2014, 02:19:04 pm
content: Hi,I have basic PIC18F25K20 circuit using 12 MHz oscillator and debug output like this:while(1){NOP();LATBbits.LATB5 = 1;NOP();LATBbits.LATB5 = 0;}The chip is resetting every few ms. When I connect MCLR pin to Vdd (it's 5V) it stops resetting. MCLR is disabled using:#pragma config MCLRE = OFF // disable reset from MCLRTo be sure I read the device and these are the config words (from config1 to config7):060014100C000001C00FE00F400Fconfig3 bit 15 is 0Watch dog and Brown-out Reset are disabled.I guess a software instruction could reset the chip, but it stops resetting when I pull up MCLR to Vdd. Also if I pull down MCLR it is held in reset - like if it was enabled. The program is pretty simple. Interrupts are disabled. I can't think of a reason why the chip should reset. I checked errata - nothing there about MCLR. Any ideas?

author: Unknown
author_rank: Unknown
timestamp: March 07, 2014, 02:55:49 pm
content: hi, your CONFIG 4 "0001" seems like you have the debugger enabled could it be that?

author: npelov
author_rank: Frequent Contributor
timestamp: March 07, 2014, 03:18:12 pm
content: Well it is thatI thought I covered that by setting "RELEASE" build in ide few times - I use this code:#ifdef __DEBUG#pragma config DEBUG = ON#else#pragma config DEBUG = OFF#endifHowever I guess I did something wrong - probably didn't run complete rebuild. Now I did and it's working fine. I guess I should do complete clean/rebuild when I switch build configuration.

author: dannyf
author_rank: Super Contributor
timestamp: March 07, 2014, 05:14:50 pm
content: QuoteOr finding a minimalist piece of your code that exhibits the issue and post all of it.A big part of getting helped is to make it easier for others to help you.

author: npelov
author_rank: Frequent Contributor
timestamp: March 07, 2014, 05:35:33 pm
content: You are right. I should have posted more/full code. But the problem is fixed.

author: Unknown
author_rank: Unknown
timestamp: March 07, 2014, 06:26:16 pm
content: Quote from: npelov on March 07, 2014, 03:18:12 pmcool! ;-)
EAGLE library, locking for motorola's one - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: March 04, 2014, 08:53:39 am
content: hi guysi'm new about the EAGLE Cad, i recently installed the program and i have been learning it.for i very tiny project i need these two parts (1) and it seems EAGLE is not provided with.i have found a very old library for the mc68ez328, but EAGLE says "too old, it is previous v4.4" refusing to import itso what could you suggest me to do ? to create a library from the scratch ? in case, any suggestion is welcome(1)- mc68hc11 in PGA52 package- mc68EZ328 in tqfp100 package

author: legacy
author_rank: Super Contributor
timestamp: March 04, 2014, 09:24:13 am
content: thisis the mc68ez328 library i am not able to importit seems 4 years later

author: 8086
author_rank: Super Contributor
timestamp: March 04, 2014, 09:25:42 am
content: Ah. You must be one of those 'component library part creation-phobes'.I used to be like you.Once you start making your own component parts you will never look back. This is probably a good time to start. I know it's not fun but it's part of the process.

author: westfw
author_rank: Super Contributor
timestamp: March 04, 2014, 09:48:40 am
content: If you're not on a windows box, try reading the library on one and writing it out in a more modern format.For some reason, non-windows versions of EAGLE seem to have less legacy format support.

author: legacy
author_rank: Super Contributor
timestamp: March 04, 2014, 10:30:24 am
content: thank you guysjust an other question: is it possible to "grab" a component from a library and to add it to a brand new custom-library ?if so, how to do it ?also … is there a library populated ONLY with packages ?

author: kile
author_rank: Contributor
timestamp: March 04, 2014, 01:41:02 pm
content: Quote from: legacy on March 04, 2014, 10:30:24 amYes, that is possible. Open the new custom library in the library editor, then go to the EagleCAD Control Panel and under libraries/lbr find the library and the component that you want to copy. Then right-click the component and select "Copy to library".
i2c: PCF8575 read write problem - Page 1
Forum section: electronics / general

author: chiart_nor
author_rank: Newbie
timestamp: March 03, 2014, 09:04:07 am
content: Hi,I'm connecting the PCF8575 with the P89C51RD2 microcontroller. I've managed to communicate with the PCF8575 chip using the i2c lines. However, i'm facing a problem with the read and write function with this chip.Meaning that, I have no problem in reading the data, also no problem in sending the data, but I'm having problem to read back the data I've already sent.Once the data sent to the PCF8575, the value that i read back will be different from what ive sent.Is it possible to do read back the data that we've already sent using this chip?Any help highly appreciated.Thanks.

author: Kjelt
author_rank: Super Contributor
timestamp: March 03, 2014, 09:31:01 am
content: I haven't looked at this ic before but scanning the datasheet in a minute it looks like this chip does NOT have any registers or commands for reading back the written data. You can only use it to write data to the ports or read data from the ports (if you made them logic 1 on forehand). So no you can not read back data you earlier sent.

author: uwezi
author_rank: Unknown
timestamp: March 03, 2014, 10:37:31 am
content: Quote from: Kjelt on March 03, 2014, 09:31:01 amThat is correct! Reading from the chip automatically reconfigures the pins as input, rather than reading back the values you set for output.