hybridfree/eevblog-posts huggingface dataset:
microcassette tape, i' am looking for schematic - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: March 01, 2014, 08:04:00 pm
content: hello guysi'd like to use a magnetic tape's head to store/read digital data properly modulated, i have to understand the best methodi am looking for a good schematic anddatasheets(especially for the tape-head)anybody has got any schematic, p.e. from hold home-computer ? let me knowit's a funny project

author: Fraser
author_rank: Super Contributor
timestamp: March 01, 2014, 08:10:10 pm
content: Suggest you Google for cassete recorder schematics as such units were used for 8 Bit home computers way back when I was a treenager. Be warned, they were pretty unreliable, often due to wow and flutter.DAT recording is the modern(ish) equivalent and that is helical scan and phase locked transport servo's much like the principle of a VCR.Sinclair came out with the ZX Microdrive that was also tape based but I believe used better transport speed stabilisation and a narrower tape. You may even find a schematic for teh microdrive somewhere.

author: PA0PBZ
author_rank: Super Contributor
timestamp: March 01, 2014, 08:12:49 pm
content: And by the way, since the tape you show has "messages" written on it I think that one came from an answering machine...

author: Fraser
author_rank: Super Contributor
timestamp: March 01, 2014, 08:15:49 pm
content: Here you go, the service manual for the ZX microdrive including descriptions and schematicStandard cassette recorders were just a cheap low data rate consumer grade item that manufacturers adopted for program storage. They use FSK I think and the bandwidth was limited by the transport speed and audio amplifiers.The microdrive was designed to be a relatively reliable tape based data recorder from the start so is tuned to the requirement.By the way, microcassete tape decks are generally not suitable for reliable data recording due to very primative transport designs. The exceptions are transports built for teh task such as found in old Sharp and Epson-Seiko 8 bit computers.The story of the microdrive:http://www.theregister.co.uk/Print/2013/03/13/feature_the_sinclair_zx_microdrive_story/A better copy of the servive manual is here:http://www.sinclair.hu/speccyalista/konyvtar/kezikonyvek/ZXInterface1-2_Microdrive_ServiceManual.pdf

author: Fraser
author_rank: Super Contributor
timestamp: March 01, 2014, 08:28:03 pm
content: If you decide to stick with a standard and common audio cassette tape as designed by philips.....I just used a Google search of "Cassette recorder schematic" and got buried in results ! Do this search and select images and you will see plenty of examples of standard cassette recorder designs. Your challenge will be finding a decent tape transport mechanism, with good wow and flutter specs.
MachXO2280 board serial over JTAG - Page 1
Forum section: electronics / general

author: Harvs
author_rank: Super Contributor
timestamp: March 01, 2014, 03:11:04 am
content: Wondering if anyone has looked into this and found a way of doing it.The XO and XO2 boards have a high speed FTDI device on them used for the JTAG programming.Would be nice if after configuration this could be re-purposed as a generic serial port for communicating with the device. There's no point if it requires breaking the programmer.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: March 01, 2014, 11:21:53 am
content: Are you talking about this boardhttp://www.latticesemi.com/en/Products/DevelopmentBoardsAndKits/MachXO2BreakoutBoard.aspx?There is a dual channel FTDI, but rumours says that only channel A is used for programming, so it should be possible to solder some wires to channel B and use it (SPI mode should be an easiest way).

author: Harvs
author_rank: Super Contributor
timestamp: March 01, 2014, 12:26:19 pm
content: The board I've got is similar, but the older cousin:http://www.latticesemi.com/en/Products/DevelopmentBoardsAndKits/MachXOBreakoutBoard.aspxHowever I'll probably use the XO2 boards in the future.I'll have to look more closely at the FTDI device on it.

author: andersm
author_rank: Super Contributor
timestamp: March 01, 2014, 01:16:25 pm
content: Older threadon the subject.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: March 01, 2014, 01:18:20 pm
content: Your board has the same dual channel FT2232H. If the rumours are correct, FTDI pins 16-19 (channel A JTAG) should be connected to PLD's JTAG, while the rest FTDI IOs should be not connected. Channel B SPI is on pins 38-41. Check page 9 herehttp://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT2232H.pdf

author: Harvs
author_rank: Super Contributor
timestamp: March 02, 2014, 07:39:01 am
content: So channel B definatly works.Out of the box how the drivers are setup it's configured as a UART. However there's some soldering pain to be had hooking up wires to the 0.5mm pitch. But it does work fine.I haven't looked into how you change it to SPI mode, I'm guessing it would need a different config file?Why the hell they didn't just break these pins out to a header is beyond me. Total fail...

author: abyrvalg
author_rank: Frequent Contributor
timestamp: March 02, 2014, 08:54:55 am
content: There is no need to configure FTDI for some specific mode before use. Just use correct MPSSE DLL and the chip will enter that mode. Thishttp://www.ftdichip.com/Support/SoftwareExamples/MPSSE/FTCSPI.htmshould work out of the box.I wrote a simple SPI EEPROM programming tool based on these FTDI's examples some time ago - there were no problems.

author: Harvs
author_rank: Super Contributor
timestamp: March 02, 2014, 09:03:36 am
content: Ok great. Thanks for your help, I'll give it a go.
Atmega and attiny power requirement to program with ISP mkii - Page 1
Forum section: electronics / general

author: chipwitch
author_rank: Frequent Contributor
timestamp: February 28, 2014, 03:50:51 am
content: I want to make a target board for programming Atmel MPU's but don't know how much power I need to make available. I'm assuming 500mA is way more than necessary. I plan on powering the board with a 9v battery, so the less power I waste on heating the lab the better. I'm guessing peak current draw will be in the 20 to 30mA neighborhood, but haven't been able to confirm that. I went through the Atmega 328 datasheet, but my current aspirations to be a novice hardly qualifies me to know what half that stuff means.

author: zapta
author_rank: Super Contributor
timestamp: February 28, 2014, 04:28:55 am
content: Quote from: chipwitch on February 28, 2014, 03:50:51 amTry, measure and add margin?

author: FreddyVictor
author_rank: Regular Contributor
timestamp: February 28, 2014, 08:48:29 am
content: Quote from: chipwitch on February 28, 2014, 03:50:51 amyep, thats in the right ballpark - I typically see less than 10mA just for mcudon't forget that if you want to drive any LED's from your pins (low power ones only!) you'll need a fair bit more than this tho'I would aim for a 100 or 200mA v-reg if this is a general purpose board

author: poorchava
author_rank: Super Contributor
timestamp: February 28, 2014, 09:43:44 am
content: Use a switch-mode power supply. In most cases this is the most efficient way to power anything, that is not high-precision analo (it's just matter of more caraful design in the latter case).

author: Psi
author_rank: Super Contributor
timestamp: February 28, 2014, 01:19:36 pm
content: A good size output cap on your powersupply should take care of any large spikes in current draw during programming.

author: chipwitch
author_rank: Frequent Contributor
timestamp: February 28, 2014, 02:57:20 pm
content: Thanks for all the replies. I've measured the draw of my Mega 1280 board and it was down around 12mA, idle. I didn't know if the act of programming might make that spike or not.As I said, I'm using a 9v battery to power the target board. I have some LM317 and some 5.1V Zeners to choose from for a voltage regulator. I know they'll waste a little power, but if it only draws 20mA... a 150 ohm resister in series with the zener will keep the resistor under 1/8 watt. An auto-shutoff circuit is probably in order.
VHDL problem - Page 1
Forum section: electronics / general

author: Harvs
author_rank: Super Contributor
timestamp: February 28, 2014, 02:37:52 am
content: I haven't used an FPGA in anger for about 12yrs now, so this is probably an obvious question.I'm using Lattice Diamond with the Lattice synthesis engine, and Modelsim for simulation.This is a basic 8bit serial transmitter, I'm sure it's not the best way of doing it, but anyway. There's a top level file that just wires up the clock and the DATA to a constant vector, then taps the outputs out to pins.It simulates fine in Modelsim, with no warnings etc.In Diamond it gives a synthesis warning of:serial.vhd(43): WARNING: Bit 10 of Register \tx_unit/shift_reg is stuck at OneThe output of the device gives the serial clock enable pulse, but the tx line is dead as expected from the warning.I've got no idea, other than maybe Lattice doesn't allow you to initialise vectors without a reset? But I never had this problem with Xilinx years ago and can't see why it would be a problem?Code:library ieee;use ieee.std_logic_1164.all ;use ieee.numeric_std.all ;entity serial_transmitter isport(CLK10MHZ: in std_logic;DATA: in std_logic_vector(7 downto 0);LOAD: in std_logic;TX: out std_logic;BUSY: out std_logic);end serial_transmitter;architecture serial_arch of serial_transmitter issignal serial_clk_div : unsigned(6 downto 0) := (others=>'0');signal serial_state : std_logic_vector(10 downto 0) := "00000000001";signal shift_reg : std_logic_vector(10 downto 0) := (others => '1');signal txer_busy : std_logic;beginprocess(CLK10MHZ)beginif(CLK10MHZ'event and CLK10MHZ='1') thenshift_reg <= shift_reg;txer_busy <= '1';if(serial_state(0) = '1') thenif(LOAD ='1') thenserial_state <= serial_state(9 downto 0) & serial_state(10);shift_reg <= "0" & DATA & "11";elsetxer_busy <= '0';end if;elseif(serial_clk_div = "1010111") thenserial_state <= serial_state(9 downto 0) & serial_state(10);shift_reg <= shift_reg(9 downto 0) & '1';serial_clk_div <= "0000000";elseserial_clk_div <= serial_clk_div + 1;end if;end if;end if;end process;BUSY <= txer_busy or LOAD;TX <= shift_reg (10);end serial_arch;

author: Harvs
author_rank: Super Contributor
timestamp: February 28, 2014, 03:14:49 am
content: Ok to answer my own question. Yes initialization matters...You use the GSR_NET signal to provide an async reset to everything, and then all is well.edit: typo
Low cost, simple journey with usbasp -> avrdude -> avr-bin,avr-gcc -> atmel uC - Page 1
Forum section: electronics / general

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: February 28, 2014, 07:52:34 pm
content: Wanted to put this here in case someone's thinking about doing a low cost,simple journey into uC (microcontroller) programming.This is all command line stuff on linux(no details on how to install for your linux)1) get the avr-binutils, avr-gcc, avr-libc (I built from source)2) get avrdude (I built from source)3) get a usbasp4) get an atmel uC (I got atmega32 40-pdip) and datasheet5) get avr Makefile template and edit for usbasp and uC6) place the uC on breadboard and consult the usbasp pinouts and the uCpinoutsi.e. MOSI -> MOSI, MISO -> MISO, VCC -> VCC, etc.7) get an 300ohm resistor and an led (fits the breadboard, through-hole)run avrdude mostly you just need -c -p like so avrdude -c usbasp -p m32(run avrdude -p ? to list what avrdude knows about uC)9) avrdude will report success, if not check your connections10) wire up your LED (look online for your uC) I used XCK/T0 - PB0 forpositive LED lead and pin 11 for GND11) here's example code I put in main.c (notice main.hex below):Code:#include <avr/io.h>#include <util/delay.h>int main(void){DDRB |= 1 << PINB0; // Data Direction Register for only output on pin 0, port Bwhile(1){PORTB ^= 1 << PINB0; // XOR (^) to toggle only pin 0, port B_delay_ms(202); // Delay between of N millisecondsfor(int i=0;i<29;i++){PORTB ^= 1 << PINB0; // XOR (^) to toggle only pin 0, port B_delay_ms(7); // Delay between of N milliseconds}}}12) send the program to uC, I did this:avrdude -v -l prog.log -c usbasp -p m32 -U flash:w:main.hex13) you should have your uC version of "Hello World!" in the formof a blinking LED.14) usbasp + breadboard(with wires) + uC + LED + resistor approx. $30I found videos by newbiehack.com and used them as a guide along the way.
Flash memory corruption - Page 1
Forum section: electronics / general

author: Richard Head
author_rank: Frequent Contributor
timestamp: February 26, 2014, 09:48:53 am
content: Is it normal for the flash memory to occasionally get corrupted on power-up?I have found this with an MSP430 device as well as a PIC. If I slow down the dV/dt on power-up it seems to help on the PIC.Dick

author: dannyf
author_rank: Super Contributor
timestamp: February 26, 2014, 12:25:52 pm
content: I have never found it to be an issue.On the flip side, I have experienced eeprom wearing out, but only in an endurance test environment.

author: Richard Head
author_rank: Frequent Contributor
timestamp: February 26, 2014, 01:10:54 pm
content: Ok, after reading that I'm worried.I never realised that it was such a common problem.In my application the micro doesn't get powered down often, luckily.There are a couple of 2.2uF tantalums across the rails, as well as a 100nF ceramic or two.Dick

author: amyk
author_rank: Super Contributor
timestamp: February 26, 2014, 01:20:58 pm
content: Haven't had this happen on various 8051s, AVRs, and PICs when they're used in an application where the flash is read-only. It probably depends on the specific model, but flash getting corruptedeven when it's not being written to(I can understand if a write operation was happening) is a little disturbing.

author: dannyf
author_rank: Super Contributor
timestamp: February 26, 2014, 01:28:03 pm
content: QuoteI wouldn't worry much about it.Putting aside design issues and chip issues, flash corruption isn't a big issue, even in high reliability applications (medical for example). RAM corruption is usually where you are more concerned about.There are cases where an application gets wiped out: most notably in pickit2/3 and some jlink clones. But those are design issues with the particular hardware.

author: Richard Head
author_rank: Frequent Contributor
timestamp: February 27, 2014, 02:05:53 pm
content: Mojo-chanThanks for the feedback. I don't know whether brown-out detection has been enabled or not. I'll look into it.I was also wondering if I could simply connect a 1K resistor between Vcc and GND to ensure that the supply dropped reasonably quickly following a power down condition. Luckily low power consumption is not a factor in this application.Dick
nuttx, tiny kernel, what do you think about ? - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: February 24, 2014, 07:36:18 am
content: nuttx

author: westfw
author_rank: Super Contributor
timestamp: February 25, 2014, 05:27:42 am
content: That's better documented than a lot of "tiny kernels", but the list of "supported platforms" includes a lot of ports that don't look like they got very far ("proved in concept" might be a better term than "supported.")

author: aflex
author_rank: Contributor
timestamp: February 26, 2014, 05:04:48 am
content: Nuttx is a famous real time operating system in the market. And it is well known for Scalability from 8-bit to 32-bit microcontroller environments. The primary governing standards in NuttX are Posix and ANSI standards.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: February 26, 2014, 05:20:20 am
content: It's famous because we said so.

author: miguelvp
author_rank: Super Contributor
timestamp: February 26, 2014, 06:22:20 am
content: Give me OS-9 or give me death!.Kidding it's older than dirt when 68000 was the microprocessor of choice and your boards hooked up to a VME bus

author: dannyf
author_rank: Super Contributor
timestamp: February 26, 2014, 12:31:03 pm
content: Many of those ports are of "I can do this" kind. No clear articulation of "why I want to do this".Unless they get some traction / scale, it is a waste of time to even look at them.
Microcontroller grounding - Page 1
Forum section: electronics / general

author: Tris20
author_rank: Regular Contributor
timestamp: February 24, 2014, 10:48:46 pm
content: Ok, so I'm pretty confidant about this but a team mate has listed something different in our report and doubt has now crept in. I expect a bombardment of "OMG HOW CAN YOU NOT KNOW THAT" style comments but meh, if I get the one comment that provides the answer it's worth it right?Anyway, when connecting a uC to some batteries and then a breadboard/pcb, am I right in saying that the negative terminal is effectively the ground. I.E. all the ground connections run back to there. NOT the GND terminal on the uC. This is connected TO the common ground but is not what actually grounds the circuit.Need to fix this in the next hour so quick responses please!Cheers guys!

author: Rudane
author_rank: Regular Contributor
timestamp: February 24, 2014, 11:02:54 pm
content: I read this a few times, and I don't see the difference. If the negative of the batteries is connected to the GND pins of the uC, then they're all at the same potential and are all ground for the circuit.EDIT: O.K. I read it some more, and to be technically correct, the common to the circuit is the negative of the battery.

author: Tris20
author_rank: Regular Contributor
timestamp: February 24, 2014, 11:06:43 pm
content: Sorry, the issue I have is that they've listed pin 1(GND) as "Ground for battery" and pin 2(VIN) as "Battery Supply".My question is really, is that accurate? I feel that listing pin1 as being responsible for grounding the battery as a bit odd. Surely it should be connection to negative terminal and connection to positive terminal respectively. Or is there a more eloquent way of putting this?Sorry I should have made it clearer in the first post. last minute assignment fear in full flow atm.

author: tszaboo
author_rank: Super Contributor
timestamp: February 24, 2014, 11:09:54 pm
content: Can we know which MCU you use? Maybe they are talking about a back-up battery for RTC and SRAM or something.

author: Tris20
author_rank: Regular Contributor
timestamp: February 24, 2014, 11:12:12 pm
content: Sure, NXP LPC1768

author: tszaboo
author_rank: Super Contributor
timestamp: February 24, 2014, 11:20:52 pm
content: "ultra-low power Real-Time Clock (RTC) with separate battery supply" datasheet first page.So that two pin is not for your main battery which powers everything, but a separate battery which only runs the RTC if main power is dead.

author: Tris20
author_rank: Regular Contributor
timestamp: February 24, 2014, 11:29:33 pm
content: Isn't that VB on pin 3?http://mbed.org/media/img/boardlogos/lpc1768/pinout.png

author: Tris20
author_rank: Regular Contributor
timestamp: February 24, 2014, 11:40:13 pm
content: "EDIT: O.K. I read it some more, and to be technically correct, the common to the circuit is the negative of the battery."Yeah this is what I thought.Ok, gone for Pin 1: "Ground connection to negative battery terminal".Thanks for the help.If a Mod sees this can you please lock the thread?Thanks.
Best FPGA Development Board for Multilevel Inverter PWM and Control Development - Page 1
Forum section: electronics / general

author: magicsmoke
author_rank: Regular Contributor
timestamp: February 21, 2014, 07:36:40 am
content: I am attempted to help a student learn about PWM algorithm development and control for multilevel inverters. The student is hoping to do this in an FPGA. Does anyone have any recommendations for development boards that would be particularly suited to this task? Is Altera preferred because of the software toolchain still?

author: jeremy
author_rank: Super Contributor
timestamp: February 21, 2014, 10:47:50 am
content: It seems like this is an awfully specific application, I do not know of any dev kits that are particularly suited to this task any more than others. If all you want is TTL or LVCMOS outputs to send to inverter circuitry, I'm sure any of the Digilent (Xilinx) or Terasic (Altera) boards would be fine. I personally prefer Xilinx because that is what I am used to, I don't Xilinx/Altera matters too much for relatively low speed stuff like what you are talking about.Do you have much experience with FPGAs? Does the student? If not, and if you are attempting to do anything that is remotely maths heavy, it might be a good idea to use a Cortex-M4F or similar board instead of an FPGA. They are much simpler and quicker to work with without getting bogged down in the subtle nuances of programmable logic.
STM32 development tool supports Arduino and mbed - Page 1
Forum section: electronics / general

author: Alex1881
author_rank: Newbie
timestamp: February 17, 2014, 10:39:49 pm
content: Hi,ST has just released the STM32 Nucleo. This is a series of development tools that allow to quickly evaluate any STM32. These boards are extensible with Arduino, and they are supported by mbed. This makes them a good basis for any embedded community.The main idea:- A lean board- Contains and STLink debugger/programmer (as all ST MCU evaluation tools do)- Contains an STM32 in 64pin package- Carries Arduino UNO v3 connectors- Carries another connector called “Morpho” (and ST development)- Has 2 Vreg and a couple of buttons and LEDsStarting from there, every STM32 Nucleo board has the same layout making the each I/O pin of the contained micro available on the same physical location of the Arduino and “Morpho” connector. Many functions are common to all STM32 on the same pin location.Arduino support:- The boards have the Arduino UNO R3 connector. This connector carries a so called IOREF pin. This pin allows the Arduino shields to adjust the IO voltage to the 3V3 for the STM32 if these shields follow the specification. The official Arduino shields are said to do soMbed support:- Mbed has full support for these boards (communities, code libraries etc.)- STLINK supportso Virtual com port (also useful outside mbed)o Mass storage mode for programming (also useful outside mbed)Apart from that it is worth noticing that the boards are supported by IAR and KEIL and they can also be used with GCC based IDEs such as Atollic.They has launched today four variants of the STM32 Nucleo based on the STM32F401RE (512K), STM32L152RE (512K), STM32F103RB (128K), STM32F030R8 (64K) anda total of 2.200 are given away at the embedded world 2014 upon prior registration.The boards come with a standard peripheral and HAL library containing also some examples.More information may also be found here:- Information about portfoliowww.st.com/stm32nucleo-Registration for the free STM32 Nucleo campaign at the embedded world 2014:http://www.st.com/web/en/support/nucleo_ew14_registration.html- Design resources in the product folders (databrief, user manual, software, schematics, etc.)http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260000(NUCLEO-F401RE)http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF259997(NUCLEO-F030R8)http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF259875(NUCLEO-F103RB)http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260002(NUCLEO-L152RE)- MBED repositorieshttp://mbed.org/teams/ST/wiki/platforms/ST-Nucleo-F103RBhttp://mbed.org/teams/ST/wiki/platforms/ST-Nucleo-F401REhttp://mbed.org/teams/ST/wiki/platforms/ST-Nucleo-F030R8http://mbed.org/teams/ST/wiki/platforms/ST-Nucleo-L152RE
555 - Page 1
Forum section: electronics / general

author: ethhanners
author_rank: Contributor
timestamp: February 14, 2014, 04:46:08 pm
content: hey im new to electronics I have made some basic led flashers with a 555 but I would like to know some more

author: JoeN
author_rank: Frequent Contributor
timestamp: February 15, 2014, 08:08:23 pm
content: Well, it's a very simple and very cheap timing circuit that can be adapted for a lot of potential uses, there are entire books written about it. It can be used for a simple low-speed clock for other clocked digital circuits, LED flashers, tone generators, it can be a non-retriggerable one-shot, which means after some event happens it sends out a pulse of a certain length, this can be used for timing actions, and it can be bi-stable too, though this has always seemed less useful to me.Looks like some good free information here:http://www.555-timer-circuits.com/Forrest Mims wrote an entire mini-book on this subject:http://www.amazon.com/Timer-Amp-Optoelectronic-Circuits-Projects/dp/0945053290

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 15, 2014, 10:04:06 pm
content: TheTalking Electronicswebsite has a bunch of 555 circuits as well as an explanation of how the 555 IC works.Download and read the datasheet as well.
Anyone wants a Virtex II to play with? - Page 1
Forum section: electronics / general

author: ElektroQuark
author_rank: Unknown
timestamp: February 20, 2014, 09:09:50 am
content: It seems an interesting board to play with (eBay link, not my auction):CLICK!30 minutes to go.

author: 8086
author_rank: Super Contributor
timestamp: February 20, 2014, 01:39:29 pm
content: QuoteSigh...

author: ElektroQuark
author_rank: Unknown
timestamp: February 20, 2014, 01:48:25 pm
content: Yep, that's the reason I have pass too...
Translating C code to Verilog - Page 1
Forum section: electronics / general

author: jeremy
author_rank: Super Contributor
timestamp: February 14, 2014, 10:56:49 am
content: Hi all,Does anyone have any good resources on taking algorithms implemented in C and translating them to HDL? I know there are lots of tools out there which offer various degrees of automated translation, but I am interested in doing it myself.

author: AlfBaz
author_rank: Super Contributor
timestamp: February 14, 2014, 11:08:13 am
content: I'm by no means a vhdl expert but I suggest you just take it on. I managed to implement bresenham's line drawing algorithm from C code without to much trouble

author: dannyf
author_rank: Super Contributor
timestamp: February 14, 2014, 02:57:14 pm
content: I usually do two things:1) Understand what the original code was doing, and how it did it. Then replicate the approach and structure in the target language; This works better if the original code is well designed and documented.2) Write you own. Essentially replicating the functionality of the original code without replicating the code itself. This works better if you find it unproductive trying to understand a poorly written and documented piece of code.

author: tszaboo
author_rank: Super Contributor
timestamp: February 14, 2014, 04:32:36 pm
content: You put a soft processor on your FPGA, then you run the code on that.C code is sequential, HDL is concurrent. They are the least alike.
New Silego Greenpak devices - Page 1
Forum section: electronics / general

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 14, 2014, 12:13:46 am
content: Silego have released a bigger version of the Greenpak mixed-signal programmable devices - looks interesting.I can't find a spec on oscillator accuracy - ISTR the earlier ones were pretty wide - something like 20%http://www.silego.com/products/greenpak3.html

author: Hypernova
author_rank: Unknown
timestamp: February 14, 2014, 08:23:35 am
content: No more ADC and PWM? I guess their main customers used them mainly for the digital logic part. You can't really call the SLG46722 "Mixed Signal Matrix" anymore when it has no analog functions.

author: Dago
author_rank: Frequent Contributor
timestamp: February 14, 2014, 12:59:43 pm
content: Thanks for the tip, they look kinda interesting! Considering they cost like 0.5$/pc they look handy. How do you program them?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 14, 2014, 01:41:42 pm
content: Quote from: Dago on February 14, 2014, 12:59:43 pmThey will supply them preprogrammed, with very low cost and MOQ

author: nowlan
author_rank: Frequent Contributor
timestamp: February 14, 2014, 02:09:59 pm
content: What exactly are they used for? They sound either a switch fabric, or fpga (lut).One time programming puts me off.

author: westfw
author_rank: Super Contributor
timestamp: February 14, 2014, 02:11:16 pm
content: Has anyone done anything interesting with the existing Silego parts? I bought the development boards, but didn't get around to actually experimenting with them :-(
PIC MCU CCP module help - Page 1
Forum section: electronics / general

author: Udayan Sinha
author_rank: Regular Contributor
timestamp: February 10, 2014, 07:35:47 am
content: I am trying to test the CCP module on a PIC18F2550. I have written the code & have connected an LED to the RC1 pin (CCP1 pin). I have configured the module in compare mode & I am using timer 3 as the time base for the module. So the expected output is a PWM wave at 50% duty cycle. However, I am getting a pure DC output of 5V (since I defined the initial value on RC1 as high). Can someone tell me where I am going wrong please.Here is the code I used -void interrupt isr(void);void sys_init(void);void CCP1_compare_init(void);void timer3_init(void);void interrupt_init(void);void ccp1_isr(void);void delay(unsigned int x);void main(){sys_init(); //initialize the systemwhile(1){while(TMR3IF==0);if(TMR3IF==1){TMR3H=0x00;TMR3L=0x00;TMR3IF=0;}}}//overall system initialize functionvoid sys_init(void){CCP1_compare_init(); //initialize CCP1timer3_init(); //configure T3CON to use timer 3 as time base for CCP1interrupt_init(); //enable interrupts}//CCP initialize function for comparevoid CCP1_compare_init(void){TRISC=0x00; //RC1 is outputRC1=1;CCP1CON=0x02; //toggle output on matchCCPR1L=0x00;CCPR1H=0xFF;CCP1IF=0; //interrupt flag}//timer 3 initialize functionvoid timer3_init(void){T3CON=0xC0; //read/write timer register in a single 16-bit operation, timer 3 is time base for both CCP1 & CCP2, no prescale, use as timerTMR3H=0x00;TMR3L=0x00;T3CON|=0x01; //start timer}//interrupt initialize functionvoid interrupt_init(void){IPEN=0; //disable priorityGIE=1; //enable interruptsPEIE=1; //enable peripheral interruptsCCP1IE=1; //enable CCP1 interrupt}//ISRvoid interrupt isr(void){asm("CALL _ccp1_isr");}//CCP1 ISR functionvoid ccp1_isr(void){CCP1IF=0; //reset interrupt flag}//delay functionvoid delay(unsigned int x){unsigned char y;unsigned int i;for(i=0; i<x; i++){for(y=0; y<255; y++);}}Let me know if schematics or configuration bit settings I used are required.
PIC16F1503 not running at 2.5v. Normal? - Page 1
Forum section: electronics / general

author: Emil
author_rank: Regular Contributor
timestamp: February 09, 2014, 12:05:47 pm
content: I have a circuit with a 2.5V regulated supply and a PIC16F1503 (QFN package) at 4Mhz.The chip was detected by the pickit3 and programed and verified. But the program was not running..Actual voltage was 2.496V (measured at the pads). I don't remember exactly how much ripple there was, but it was <<50mV. After much trouble shooting I removed the regulator and connected it to a variable supply from an LM317. Still not running at the same voltage. After adjusting it up to 2.506 or so volts it started working normally..According to the datasheet this chip should run at 2.3-5.5V at <16Mhz. There is nothing in the errata to indicate otherwise.I will switch to an LF version so this won't be a problem for my circuit, but seems strange..Is this a normal problem? Is it best practice to avoid running PICs close to the lower voltage rating? (200mV didn't seem that close..)

author: dannyf
author_rank: Super Contributor
timestamp: February 09, 2014, 03:14:26 pm
content: Anything contradicting the datasheet us not normal. However, the fact that your code didn't work on the chip is no conclusive indication that the chip is at fault.I would try a simple blinky on the chip to nail down the root cause.

author: 8086
author_rank: Super Contributor
timestamp: February 09, 2014, 03:17:54 pm
content: Do you have BOD set to 2.5V or something like that?

author: Emil
author_rank: Regular Contributor
timestamp: February 09, 2014, 09:23:42 pm
content: Quote from: 8086 on February 09, 2014, 03:17:54 pmThat was it. After disabling Brown-out Reset it runs fine at 2.5V (and much lower). I had not set the brownout fuse and I see now that it defaults on.Thank you 8086.
My universal programmer taught me a valuable lesson! - Page 1
Forum section: electronics / general

author: Unknown
author_rank: Unknown
timestamp: February 03, 2014, 06:03:40 pm
content: Programming the PIC 18F2520 in my TOP3100 programmer I thought would be no problem at all; I paid £130 for it a few years ago and it claims to do all the devices on the planet - all except the 18F2520 that is! I tried different software revisions and different OS versions; i wasted ages messing around. So I just ended up buying a PICKit2 and that worked perfectly!I don't see how they can claim to program all these chips if they haven't fully tested the software on them; I'm only a hobbyist on a mission, but I'll certainly not buy anything other than more expensive chip vendor approved programmers in the future.

author: dannyf
author_rank: Super Contributor
timestamp: February 03, 2014, 06:45:40 pm
content: -claims to do all the devices on the planet -that's a sign of things to avoid: if a device can do anything, it can't do anything well.

author: valentinc
author_rank: Regular Contributor
timestamp: February 03, 2014, 09:40:08 pm
content: There are always new microcontrollers on the market, so they can't make a universal one that can support all the MCUs on the planet... There will always be exceptions... That programmer is meant for people who service a lot of gear, and need to program EEPROMs, flash memories and diffrerent microcontrollers and don't want to bother with 3 or 4 programmers... For a hobbyist like you, if you only work with PICs, the best (and cheapest solution) is to buy a PICkit, or build yourself a clone... That's a solution too...

author: aflex
author_rank: Contributor
timestamp: February 06, 2014, 08:30:45 am
content: With regular update in technology it is very difficult to persist with the same chip. And I am very much agree with dannyf, no chip can do it for all perfectly.

author: scientist
author_rank: Frequent Contributor
timestamp: February 07, 2014, 03:51:36 am
content: The only thing in the world that's consistently and infallibly "universal" is a sledgehammer.

author: paulie
author_rank: Frequent Contributor
timestamp: February 07, 2014, 09:34:19 pm
content: at one point i was convinced it was necessary to buy a new programmer for every new microchip part. and they are not cheap. at least not like $3 avrasp which does all avrs, old and new. same for 10 cent lpt programmer which can never be implemented with pic. just a few reasons atmel was like a breath of fresh air.

author: dannyf
author_rank: Super Contributor
timestamp: February 07, 2014, 10:12:38 pm
content: QuoteOnly so far.On the topic of "universal programmers", there indeed are reprogrammable programmers that with the correct programming algorithm loaded, can program a lot of mcus - in theory practically all if the programming algorithm is known.One of them is freeware, I think. But the project is no longer in active development.
Does AU7860A ring a bell? - Page 1
Forum section: electronics / general

author: charliecrash
author_rank: Newbie
timestamp: February 05, 2014, 06:25:49 pm
content: Hi all! First post, and I'll just jump right into it...I've got a terrible little audiorecorder (tpro.com Urec7) that insists on recording AMI-ADPCM-encoded wav-files in 128kbps 32khz, mono.Had it just been stereo in a bit higher bitrate I would not have complained, but mono, c'mon...I just had to open the thing and I found that the brain inside is a MV Silicon AU7860Ahttps://dl.dropboxusercontent.com/u/2666050/au7860a.pdfhttp://www.mvsilicon.com/casesInfo.aspx?id=80&typeid=6(Chinese site)That chip sits on a pre-made multipurpose-unit with USB & SD reader called SF6021https://dl.dropboxusercontent.com/u/2666050/sf6021.jpgWhat I can see from the board it looks like it's got seperate Left/Right inputs to the correct legs on the chip, so it should be able to record stereo with the right settings.Question:Is there anyone here that suspects a way to communicate the settings to that chip?

author: amyk
author_rank: Super Contributor
timestamp: February 06, 2014, 01:18:32 pm
content: You're right that the hardware supports stereo, but since it's an OTP device if the firmware doesn't support stereo you're out of luck. But maybe you can try to change the settings for recording from the interface?

author: charliecrash
author_rank: Newbie
timestamp: February 07, 2014, 04:57:59 am
content: Hmm... I had to Google OTP. Which is it?http://www.acronymfinder.com/OTP.htmlUnless there is a hidden combination of buttons on bootup or something I've missed, there's no way I can change it on the interface.I've contacted both tpro.com and chip manufacturer but no answer as of yet.

author: fake-name
author_rank: Regular Contributor
timestamp: February 07, 2014, 07:31:30 am
content: Quote from: charliecrash on February 07, 2014, 04:57:59 amOTP = One Time ProgrammableBasically, the firmware is permanently written into the MCU, and cannot be changed after writing. It's the opposite of modern flash/EEPROM program memory.
Weird timing issue in STM32 - Page 1
Forum section: electronics / general

author: petoknm
author_rank: Newbie
timestamp: February 03, 2014, 06:42:53 pm
content: HelloI have STM32F4Discovery board and I am having weird problems with timer clock. I am using separate timer TIM5 to generate interrupt every 1us (CPU freq=168MHz so I think it is possible(but it also happens with 10us interrupts...)) My main source of clock is XTAL 8 MHz that is on the board. that is then multiplied by the internal PLL to generate 168MHz CPU clock and that is than divided by 1(i checked it in all source files and header files) to generate AHB clock so AHB should be also 168MHz that is then divided further by 4 to get APB1 clock... hopefully 42MHz...TIM5 is connected to APB1 bus... but when i set the timer up it counts up twice as fast as i expect it to count... what may be the problem... I am probably overlooking something... but I don't know what... Is the clock source of the timer APB1 clock directly? I included partial page of the datasheet about the clocks... Please give me some feedback so I can know what I'm doing wrong...with this code below I can get should get 20us interrupts but I am getting 10us interrupts... WHY??? Thank youSOLVED:!!! I see the problem now... in the datasheet it says that if APB1 prescaler is not 1 then the clock to the timer is multiplied by 2...!!!Timer init function:NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);NVIC_InitTypeDef NVIC_InitStructure;TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;/* Enable the TIM5 gloabal Interrupt */NVIC_InitStructure.NVIC_IRQChannel = TIM5_IRQn;NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;NVIC_Init(&NVIC_InitStructure);/* TIM5 clock enable */RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM5, ENABLE);/* Time base configuration */TIM_TimeBaseStructure.TIM_Period = 20-1; // 1 MHz down to 50kHz (20 us)TIM_TimeBaseStructure.TIM_Prescaler = 42 - 1; // 42 MHz Clock down to 1 MHz (adjust per your clock)TIM_TimeBaseStructure.TIM_ClockDivision = 0;TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;TIM_TimeBaseInit(TIM5, &TIM_TimeBaseStructure);/* TIM IT enable */TIM_ITConfig(TIM5, TIM_IT_Update, ENABLE);/* TIM5 enable counter */TIM_Cmd(TIM5, ENABLE);interrupt handler:void TIM5_IRQHandler(void) {if (TIM_GetITStatus(TIM5, TIM_IT_Update) != RESET) {TIM_ClearITPendingBit(TIM5, TIM_IT_Update);ticksus += 10;if (ticksus % 1000 == 0) {ticksms += 1;if(ticksms%100==0){GPIO_ToggleBits(GPIOD, GPIO_Pin_7);}}}}

author: dannyf
author_rank: Super Contributor
timestamp: February 03, 2014, 07:03:02 pm
content: It would have been a miracle if your code did what you expected.

author: leppie
author_rank: Frequent Contributor
timestamp: February 05, 2014, 10:36:10 am
content: You should be using PWM output from what I can see...
CAN Message Filtering Issue - Page 1
Forum section: electronics / general

author: ganeshredcobra
author_rank: Newbie
timestamp: January 31, 2014, 10:25:27 am
content: Hi,I am trying to implement CAN Message Filtering but the node is not filtering its accepting all ID's.This is the code What will be the issue?I am using PIC18F25K80 and PIC C18 Compiler.RXM0SIDH = 0xFE;RXM0SIDL = 0x00;RXM0EIDH = 0x00;RXM0EIDL = 0x00;RXF0SIDH = 0xFC;RXF0SIDL = 0x00;RXF0EIDH = 0x00;RXF0EIDL = 0x00;RXB0CON = 0x00;Is anything More to add

author: arcom
author_rank: Contributor
timestamp: January 31, 2014, 11:38:30 am
content: You have defined only one message filter and there are 6 of them in Mode 0 (assuming you use Mode 0). By default, filters and masks are setup so that they allow all messages through. In your case, RXF0+RXM0 will block certain messages but other filters (RXF1-RXF5) will allow them so in the end you still receive all messages. You need to configure all filters to the same value if you want to filter specific messages (also also set both masks to the same value).If you are using Mode 1 or Mode 2, there is a set of special registers available (RXFCONn) where you can enable/disable each filter as required.

author: ganeshredcobra
author_rank: Newbie
timestamp: February 03, 2014, 06:29:57 am
content: Thanks arcom that really helped.Can you explain how filter and mask works and also how to configure RXFCONn

author: ganeshredcobra
author_rank: Newbie
timestamp: February 03, 2014, 07:37:39 am
content: How can a i set a filter so that it must support ID's 0x7EX ie from from 0x7E0 to 0x7EF?

author: matkar
author_rank: Regular Contributor
timestamp: February 03, 2014, 03:58:25 pm
content: For extended ID set the values as per picture. If your ID is standard change all filters to standard as well.
best free RTOS for dsPIC - Page 1
Forum section: electronics / general

author: NiHaoMike
author_rank: Super Contributor
timestamp: January 31, 2014, 04:14:10 am
content: What free RTOS would you recommend for use on dsPIC? I looked at Q-Kernel but there are basically no examples of how to use it. Performance isn't all that critical so I'd prefer something that's easy to use.

author: dannyf
author_rank: Super Contributor
timestamp: January 31, 2014, 11:50:25 am
content: Depends on what you mean by "best".

author: NiHaoMike
author_rank: Super Contributor
timestamp: January 31, 2014, 02:00:38 pm
content: I'm just looking for something that's free (at least for personal use) and easy to get started with. It's my first time running a RTOS on a microcontroller.

author: dannyf
author_rank: Super Contributor
timestamp: January 31, 2014, 03:01:49 pm
content: I have used ucosII (not on your particular chip) in the past. Good documentation + support.RTThread is fairly popular as well, as is freeRTOS.Sometimes the compiler vendors will throw in a free RTOS so that's another possibility.I think that unless you have a real mmu, running a true OS is more pain than it is worth. A job scheduler might be a more appropriate solution.
CPLD wiring - Page 1
Forum section: electronics / general

author: attie
author_rank: Contributor
timestamp: January 30, 2014, 08:10:43 am
content: Hi Everyone,I'm looking to use a CPLD as a bit of glue logic between a big processor and some FRAM.Looking at the XC95144XL - it has 8 function blocks, each with a number of I/O pins, but none with enough for the full address bus.My question is - Would it make most sense to connect the address/data bus lines to the CPLD based on the physical pin location (making the PCB routing easier), or based on the function block a pin is assigned to (potentially making the CPLD's internal logic tighter/more efficient).In this situation I doubt that I'll be pressed against the limits of the CPLD's capacity, so this may come down to opinion... But I'm interested to hear your thoughts and reasoning.Thanks in advance!

author: nctnico
author_rank: Super Contributor
timestamp: January 30, 2014, 11:11:19 am
content: The best thing to do is spread the address lines over several function blocks and leave a few pins unused. It depends a bit on the device utilisation and complexity of the logic you need. Ofcourse you should route the lines so you have a direct connection to the FRAM. That probably takes mixing address and data lines.
rotary encoder pic-program. anyone see the problem? - Page 1
Forum section: electronics / general

author: matise
author_rank: Contributor
timestamp: January 27, 2014, 03:03:51 pm
content: Dosent work.I have the basefrequency coming up on oscilloscope but encoder gives nothing.its my first try to programming an encoder and i thought i found a simple way.the dds is a AD9850-module.#include <p18f1220.h>#pragma config WDT=OFF , OSC=INTIO2 , PWRT=ON, LVP=OFF, MCLRE=OFF#include <delays.h>// data out pin 10// clk out pin 11// ud out pin 12unsigned long freq;int count;int pin1,pin2;int ny1;int ny2;int sum1;int sum2;void main(void){//SET UP//OSCCON defaults to 31kHz. So no need to alter it.ADCON1 = 0x7F; //All io is digital or 0b01111111 in binaryTRISA = 0b11111111; //sets PORTA as all inputsPORTA = 0b00000000; //turns off PORTA outputsTRISB = 0b00000000; //sets PORTB as all outputsPORTB = 0b00000000; //sets off PORTB outputs, good start positionfreq =125413045;while(1);{for(count=0;count<32;count++) //Data count{if(freq=1) //if data is 1{PORTBbits.RB4 = 1; //DataPORTAbits.RA0 = 1; //rotary encoder inPORTAbits.RA1 = 1; //rotary encoder inpin1 = PORTAbits.RA0;pin2 = PORTAbits.RA1;if(pin1==1)sum1 = 0x08; //if encoder/RA0 is 1 then bit 3 is 1if(pin2==1)sum1 |= (1<<2); //mask RA1 to bit 2ny1 = PORTAbits.RA0; //Next encoder rotationny2 = PORTAbits.RA1;if(ny1 != pin1 || ny2 != pin2) //if new numbers{if(ny1==1)sum1 |= (1<<1); //if RA0 is 1 then bit 1 is 1if(ny2==1)sum1 |= (1<<0); //if RA1 is 1 then bit 0 is 1if(sum1 == 1 || sum1 == 7 || sum1 == 14 || sum1 ==freq =+1024; //clockwise movementif(sum1 == 11 || sum1 == 13 || sum1 == 4 || sum1 == 2) freq=-1024; //counter-clockwise movement}}elsePORTBbits.RB4 = 0;PORTBbits.RB5 = 1; //ClockPORTBbits.RB5 = 0;}PORTBbits.RB4 = 0;for(count=0;count<8;count++){PORTBbits.RB5 = 1;PORTBbits.RB5 = 0;}PORTBbits.RB6 = 1; //UdPORTBbits.RB6 = 0;}}

author: angst7
author_rank: Contributor
timestamp: January 27, 2014, 03:30:36 pm
content: You initialize freq, but then you set it to 1 each time you hit the if statement.if(freq=1) //if data is 1should probably be:if (freq==1)Otherwise freq is never modified. Should you increment or decrement it somewhere in the else block?

author: TerminalJack505
author_rank: Super Contributor
timestamp: January 27, 2014, 04:19:45 pm
content: Your code will never get beyond this line:Code:while(1);Try removing that semicolon for starters.
DST1102B and JTAG - Page 1
Forum section: electronics / general

author: gafbich
author_rank: Contributor
timestamp: January 25, 2014, 05:09:48 pm
content: Good afternoon, tell me how to sew using DST1102B JTAG aboard S3C2416. Of iron have Olimex ARM-USB-TINY and J-Link-ARM(Segger). Please help!
DFU bootloader for STM32F103?? - Page 1
Forum section: electronics / general

author: MatCat
author_rank: Frequent Contributor
timestamp: January 26, 2014, 01:53:11 am
content: I designed my own little dev board for the STM32F103VE7, which has an internal serial bootloader, though I wanted to put a proper DFU on it. I tried using the Maple bootloader modified slightly however it's driver is hopelessly out of whack, and I think the DFU code on it is dated and modified. I have been looking everywhere for a DFU bootloader that will work on this chip using standard STM32 DFU loader, but not having much luck, if anyone knows I would appreciate some help, thanks!

author: C
author_rank: Super Contributor
timestamp: January 26, 2014, 04:04:05 am
content: How about from STThe page with linkshttp://www.st.com/web/en/catalog/tools/PF258157Get code from above pageThe Pdf from above page containing description of DFU examplehttp://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/CD00158241.pdfC