Close

Current feedback working

A project log for Memristor Simulator for a Neural Network

Simulating the functionality of memristors using off-the-shelf parts to form a neural network crossbar array

justin-davisJustin Davis 03/13/2017 at 17:230 Comments

I updated my software to store the resistance value and then bump it up or down with the difference in the voltage. Since I'm reading the analog inputs, I get values between 0 and 1023. So the difference is at most -1023 and +1024. The digital pot has steps from 0 to 255. So I store the resistance as a 16-bit number, and then right shift by 8 to get the value to send to the pot. Each timestep I take the voltage difference and subtract it from the resistance value. This is a simple way to do it for now, but I'll want a more sophisticated and adjustable response later.

Next I'll get the digital outputs switched to PWM and try to do two out-of-phase sine waves. Then I should have something good to show on the scope.

Discussions