Blog J.Schweiss

Infosammlung zu .NET- Programmier-Themen & Elektronik

Docker with EmonCMS

clock Juni 27, 2016 00:28 by author Administrator

Intro EmonCMS



Digital Filter for Offset removal

clock Juni 27, 2016 00:25 by author Administrator

here



WiFi Logger Onewire

clock Juni 25, 2016 03:21 by author Administrator

here with ESP8266

LiPo-Blitzer



Acryl

clock Juni 25, 2016 03:00 by author Administrator

here materials



LogikAnalyzer

clock Juni 22, 2016 06:42 by author Administrator

Ikalogic

Edu-Kit



nRF24L01 on ATTiny84

clock Juni 22, 2016 06:31 by author Administrator

here

TinyDebugSerial and code

WiFiLoggerOneWire



DigiX

clock Juni 22, 2016 06:22 by author Administrator

The DigiX has a 32-bit 84 MHz MCU, embedded low power Wi-Fi (b/g/n), mesh networking support, 99 usable i/o pins, audio output, USB on the go support, onboard EEPROM, on-board microSD slot, built in real time clock, and is 100% compatible with anything that works with the Arduino Due - no adapters, code changes, or special software needed! This is the ultimate Arduino compatible development board, ready for any project!

Here are the specifications:

-84 MHz Clock Speed
-32-bit ARM Processor (AT91SAM3X8E)
-On board 802.11b/g/n WiFi Module (FCC/CE Approved)
-On board MicroSD slot
-On board 4KB (32kbit) EEPROM
-nRF24L01+ wireless module socket (not included)
-3.3V, 3.4-5.5V (LiPo Ready), 5V, or 6-16V input (onboard buck regulator)
-96KB SRAM
-512KB Flash
-1A @ 3.3V and 1A @ 5V Available (when powered at 5V+)
-99 I/O Pins
-12 PWM
-12 Analog Input
-2 Analog Output (DAC)
-Onboard LED (connected to Pin 13)
-130ma Total Current Output from Processor

The DigiX - like the Arduino Due, UDOO, and Spark Core runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Connecting the I/O pins to higher voltages, including 5V, could damage the DigiX.

Wiki

Arduino DUE



ATMEL–ICE - DebugWire

clock Juni 20, 2016 02:53 by author Administrator

here

megaAVR (JTAG) DebugOptions

The JTAG interface is enabled using the JTAGEN fuse, which is programmed by default.

OCDEN fuse can be programmed (by default OCDEN is un-programmed)



Heizkurve einstellen

clock Juni 18, 2016 19:12 by author Administrator

hier



Thermoelemente

clock Juni 14, 2016 07:39 by author Administrator

here



ESP8266

clock Juni 8, 2016 17:53 by author Administrator

intro logging to excel



LED Ansteuerung

clock Juni 8, 2016 06:13 by author Administrator

hier und eine Übersicht

Relais ansteuern



NRF24 Tipps

clock Juni 8, 2016 06:10 by author Administrator

here with Dallas sensor



Adventure with “ATATMEL-ICE-PCBA” and ATMEL Studio 7

clock Juni 7, 2016 05:44 by author Administrator

Incircuit-Debugging wäre ja ein schöne Sache …..

Aber warum einfach ….

 

Ich habe mit das Modell “ATATMEL-ICE-PCBA” hier bestellt:

image

For nearly 35 USD, nice price … and that is what you get:

image

 

No cable included!  100mil Header!

 

*** ATMEL, Disappointed! ***

 

Here the PDF Userguide.

There are some (Erfahrungsbericht) additional sites and blogs, experiencing the same mess.

  • The PC immediately recognises the ICE and can read the arduino’s avr settings on the "Tools/Device Programming" via ISP.
  •  

    Then i tried to start a debug session: "You cannot debug via ISP. Only the device is programmed. Use debugWIRE for debugging …".

    Ok. Program only … program running. But the arduino bootloader (enabling uploading via arduino’s USB) was gone …

Hmmh. I had seen the DWEN Fuse on the "Tools/Device Programming/Fuses" tab and enabled it.

The fuse was set immediately and i couldn’t access any of the ISP features anymore! Shock! Arduino bricked!?

On the projects settings on the "Tool" tab, there is a setting for ISP or debugWIRE. Enabled debugWIRE –

then i could upload AND debug my application – although transfer is a bit on the slow side. Yay!

 

-> How to get back to SPI? –> Menu “DEBUG”  - “Disable  debugWire and Close”

 

But, in sequence:

 

1.) manual “fabrication” of Header-Cable ( Steckverbinding 2mm 2*5pol auf 2*3pol 2,54 mm SPI use for ATmega328):

image

 

image

image

image

 

4.4.13. debugWIRE Software Breakpoints

The debugWIRE OCD is drastically scaled down when compared to the Atmel megaAVR (JTAG) OCD. This means that it does not have any program counter breakpoint comparators available to the user for debugging purposes. One such comparator does exist for purposes of run-to-cursor and single-stepping operations, but additional user breakpoints are not supported in hardware.

Instead, the debugger must make use of the AVR BREAK instruction. This instruction can be placed in FLASH, and when it is loaded for execution it will cause the AVR CPU to enter stopped mode. To support breakpoints during debugging, the debugger must insert a BREAK instruction into FLASH at the point at which the users requests a breakpoint. The original instruction must be cached for later replacement.

When single stepping over a BREAK instruction, the debugger has to execute the original cached instruction in order to preserve program behavior.

In extreme cases, the BREAK has to be removed from FLASH and replaced later.

All these scenarios can cause apparent delays when single stepping from breakpoints, which will be exacerbated when the target clock frequency is very low.

It is thus recommended to observe the following guidelines, where possible: • Always run the target at as high a frequency as possible during debugging.

The debugWIRE physical interface is clocked from the target clock.

• Try to minimize on the number of breakpoint additions and removals, as each one require a FLASH page to be replaced on the target

• Try to add or remove a small number of breakpoints at a time, to minimize the number of FLASH page write operations

• If possible, avoid placing breakpoints on double-word instructions

4.4.14. Understanding debugWIRE and the DWEN Fuse

When enabled, the debugWIRE interface takes control of the device's /RESET pin, which makes it mutually exclusive to the SPI interface, which also needs this pin. When enabling and disabling the debugWIRE module, follow one of these two approaches:

• Let Atmel Studio take care of things (recommended)

Set and clear DWEN manually (exercise caution, advanced users only!)


Important: When manipulating DWEN manually, it is important that the SPIEN fuse remains set to avoid having to use High-Voltage programming.

So… hardware hooked up? DebugWIRE enabled? Well hell, start debugging. AVR Studio will find all your source code files and give you all the magic you need to single-step and breakpoint operate your Arduino. You’ll find your code has some extras in it you didn’t write, since that’s the nature of the preprocessor that Processing uses to get the code to compile by GCC, but that’s a story for another time.

Arduino:  That’s a lot of words to say "remove a capacitor and it works." from Reset-Line!

 

Using in my case Arduino-Nano, remove disturbing C4 (100nF / 0603 ) :

image

 

Arduino-Nano: Solder out C4 for Reset-Line for debugWire-use!

 

Because of error message:

“Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool)

           Unable to enter programming mode. Verify device selection, interface settings, target power, security bit, and connections to the target device.”

image

 

 

Two choices on “Tools/Device Programming”:

 

image

Pressing “Apply”

image

 

image


Fuses fror Arduino NANO:

If BootRST-fuse is set –> Reset will start at location which is set by BOOTSZ-Fuse! Not at 0x0000 – address!

Don’t touch DWEN!

image

 

Next Step  “Start with debugging” fails because DWEN isn’t set yet:

image

 

Hitting “YES”-Button:

image

 

Ok, switch Nano off and on again!

And voilá (C-Highlevel & Assembler-Debugging) is available:

image

 

And how to return to SPI-progamability: 

Press not “Stop Debugging”  but on Menu during debug-mode:

 

Debug.Disable debugWire and Close” does the trick:  That is the unique location to do this!

 

image 

 

I used demo-nonsense-code and didn’set DDRB for PortB, and set it manually afterwards in the PortIO-Window.

Knowing this code will start at begin of flash address-space, i diabled BOOTRST-Fuse and not let point reset-vector to 0x3C00h.

 

Going onwards ….



Data Access Layer and EF

clock Juni 5, 2016 05:58 by author Administrator

Data Access Layer – Tutorials

image



IoT Action with SignalR

clock Juni 5, 2016 05:54 by author Administrator

here



Service based Arduino Data Logger

clock Juni 5, 2016 05:48 by author Administrator

service based



Voltage Booster

clock Juni 2, 2016 03:42 by author Administrator

tip mit p-Kanal MosFET

Sw



E-Simulation

clock Juni 1, 2016 23:28 by author Administrator

Simulation



IOT-Logger

clock Mai 31, 2016 05:39 by author Administrator

here @ homecircuits

IOT platforms