-
Hello Gordon, thank you for your response.
I think this problem is not about Serialx, I tried your code.
setInterval("LED.toggle",500) //device failed here
this command hangs too. device doesn't response after this command and led is not flashing.
One more issue;
If I type an undefined function or variable, it also hangs like this :gogogo Uncaught ReferenceError: "gogogo" is not defined Execution Interrupted //device failed here
board doesn't response after this command too.
here is some output that works well and hangs at the end.
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v91 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate >console.log('Merhaba') Merhaba =undefined >1+1 =2 >x=function() { console.log("Merhaba")} =function () { ... } >x() //device failed when I call x() but all the others worked good until this one.
-
Hello,
When I try to setup a serial port this board hangs with espruino. I have two boards which has the same problem.
I have used this commands
Serial1.setup(9600,{rx:B7,tx:B6});
Serial2.setup(9600,{rx:B7,tx:B6});
Serial3.setup(9600);
Serial2.setup(9600);
etc...all those commands hangs the board, board doesn't response any more. I have tried those binaries
espruino_1v80_stm32vldiscovery.bin
espruino_1v91_stm32vldiscovery.bin
espruino_1v92_stm32vldiscovery.bin
espruino_1v93_stm32vldiscovery.binAm I doing some thing wrong?
-
-
Hello,
I'm sorry to activate this thread again.
After my last post, suddenly it worked with a 0.1uf ceramic capacitor. Then I had a break on this project for 2-3 monts.
Now, I have created an other circuit as the same of last working one. But getting the same error. Now in my test results pic allways flooding CL-LF (Char 10 and Char 13).
But when I put the circut 30 cm away from my notebook, it doesn't flood 10 and 13 char.
Espruino board and pic connected to the same power source with the same ground. I have tried more than 10 capacitors, but result is the same. I can only guess that all my capacitors are broken. Tomorrow I'm going to buy new capacitors.
Capacitors code is "104" I think I'm using the right one.
Do you have any other idea?
-
-
Hello,
Here is what we want to do :
We have 192 devices that using PIC16f628A. Each device has own ID. Each device controls a stepper motor driver.All devices is connected to Espruino Board with a serial cable. I mean it is a 1-n connection. Espruino TX port is 1 and there is 192 RX port connected to this Espruino TX port.
We have this kind of sytax;
START-(15,25,35)(5)-END
START-(22,23,23)(15)-ENDThis syntax means that ;
Devices with the ID of 15,25, and 35 will run stepper motor 5 times.
Devices with the ID of 22,23, and 23 will run stepper motor 15 times.My aim is sending data to all devices at the same time.
What do you think? Is it a good way to connect 192 devices to a single TX port? What kind of problem will I have?
Thanks for your ideas.
-
Now, We could understand why this problem occurs.
This is the exact reason;
This problem occurs If PIC is located less than 30 CM to a charging notebook. If notebook is not charging this problem doesn't occurs. If pic located more than 30CM this problem doesn't occur.In my last post, I have told that this problem doesn't occurs on my friends notebook; Yes it didn't occur because we carried the curcuit near to his notebook and his notebook was working on battery.
We have placed 1,2,3,4 and more decoupler on circuit. But it doesn't effect on this problem.
-
This occurs only when I test it with my notebook. Works great on my friends notebook.
@DrAzzy Shuld I use decoupler between VCC -> GND? -
@DrAzzy I don't use decoupling cap in this circuit. I'm going to try it.
@allObjects, I could understand if my body is transmiting noise on circuit. But I can touch left side of the Cable. If my body transmiting noise, why it doesn't transmit to the left side of cable? Why it tranmits to only right side?
-
@DrAzzy @Gordon
Today, It started working mysteriously. I'm sending 65 ("A") and PIC adds +1 and writes back 66 ("B"), so expected result is printing "B" every second.I think it was not working because of some noise.
You can see this video to understand why I am suspecting about noise :
Attention : This video includes brain damaging English .
https://www.youtube.com/watch?v=W4GECIrVKgg
As you can see this noise occurs at the half of the cable when I get closer my finger. I can touch the other half of cable.
Isn't this interesting.
-
-
-
-
Thanks for attaching the picture though - it makes finding problems a
lot easier :)Is this real? or are you kidding ? :)
Yes, I have only two wires RX and TX. But there is a red-small jumber on the PIC's board. This is VDD of PIC. I think you don't mean this, you mean a GND for Serial communication.
-
Hello,
I'm trying to communicate with PIC16F628A on serial. I have a STM32F4 Discovery Board intalled Espruino.
I have coded 16F628A with PicC. I can simulate the hex file in ISIS Proteus. It works perfect on ISIS Proteus. PIC's job is easy, reat the TX and write it to RX. So, work is a simple ECHO
Simulation works good, but problem occurs in real world. I'm writing the hex file to PIC and wiring it with Espruino board.
From Espruino I'm sending some chars over TX to the PIC but getting back random values on RX. You can find attached images how do I wire it.
I think this problem is not about Espruino, because when I plug boards TX and RX pins together Espruino can write and read wery well.
But I'm wondering about wiring or you may give me an idea.
Here is my Espruino code :
Serial1.setup(9600,{rx:B7,tx:B6}); Serial1.on('data', function (data) { console.log(data); }); setInterval(function(){ Serial1.print("Hello World"); },500);
-
I have updated the firmware here is the test results
>console.log(eeprom.a(eeprom.i2ca)); 2 =undefined >console.log(eeprom.i(0x64)); 80 =undefined >console.log(eeprom.cap); 256 =undefined >I2C2.writeTo(0x50,0); =undefined >I2C2.readFrom(0x50,8); =new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]) >I2C2.writeTo(0x50,0x64); =undefined >I2C2.readFrom(0x50,8); =new Uint8Array([77, 69, 82, 72, 65, 66, 65, 111])
>eeprom.write(0x64,"Merhaba") =7 >eeprom.read(0x64,7) =new Uint8Array([77, 101, 114, 104, 97, 98, 97])
I think it has been done.
-
@Gordon OK, I'm going to update firmware.
I have realized that E.toString() return value as native code
>E.toString(65) ="function () { [native code] }"
-
my process.version output is "1v72"
By the way I'm not using this module : http://www.espruino.com/modules/AT24.js
I think my AT24 Module is build-in -
@DrAzzy I have not decoupling cap, I'm going to buy and apply it.
But I have tried your code without decoupling cap. I think results are good;>console.log(eeprom.a(eeprom.i2ca)); //check that I2C addressing is being done right function () { [native code] } =undefined >console.log(eeprom.i(0x64)); //check that memory addressing is being done right 80 =undefined >console.log(eeprom.cap); //sanity check - should be 256 (capacity supplied as kbits, but internally handled in bytes. 256 =undefined >I2C2.writeTo(0x50,0); //select address 0 manually =undefined >I2C2.readFrom(0x50,8); //read 8 characters manually =[ 255, 255, 255, 255, 255, 255, 255, 255 ] >I2C2.writeTo(0x50,0x64); //select address 0x64 manually =undefined >I2C2.readFrom(0x50,8); //read 8 characters manually =[ 110, 97, 117, 111, 119, 117, 105, 111 ] >
Also I don't know does it care but here is some results about addressing ;
>eeprom.i(2); =80 >eeprom.i(0x64); =80 >eeprom.i(0x50); =80 >eeprom.i(1); =80 >eeprom.i(0); =80 >
One more test result is below, I think it writes and reads when I try manually
>I2C2.writeTo(0x50,0x64); =undefined >I2C2.writeTo(0x50,0x64,"MERHABA"); =undefined >I2C2.writeTo(0x50,0x64); =undefined >I2C2.readFrom(0x50,7); =[ 77, 69, 82, 72, 65, 66, 65 ]
-
@DrAzzy Thanks for your response, I have revised the code like this;
I2C2.setup({scl:B10,sda:B11}); var eeprom=require("AT24").connect(I2C2, 8, 2, 0); console.log(eeprom.write(0x64,"Merhaba")); setTimeout("console.log(eeprom.read(0x64,7));",20);
But It is the same result.
-
-
Yes, I had many mistakes on code; Also I had misakes on wiring.
Here is the correct one
EEPROM VCC -> Board 5V
EEPROM CSS -> Board Ground
EEPROM SCL -> Board SCL (B10)
EEPROM SDA -> Board SDA (B11)Also I have placed two 10k ohm resistors between VCC -> SCL and VCC ->SDA
I2C2.setup({scl:B10,sda:B11}); var eeprom=require("AT24").connect(I2C2, 8, 256, 0); console.log(eeprom.write(0x64,"Merhaba")); console.log(eeprom.read(0x64,7));
line console.log(eeprom.write(0x64,"Merhaba")); outputs 7
but console.log(eeprom.read(0x64,7)); delays 10-12 seconds and outputs this error;
Uncaught InternalError: Timeout on I2C Read Receive Mode at line 2 col 2 b)} ^ in function "read" called from line 1 col 31 console.log(eeprom.read(0x64,7));
-
Hello,
I'm trying to wire up and 24C02A EEPROM and read-write data on it.
I'm using this datasheet : http://pdf.datasheetcatalog.com/datasheets/90/80419_DS.pdfI'm using SMT32F4 Discovery.
I have vired as this
EEPROM VCC -> Board 5V
EEPROM CSS -> Board Ground
EEPROM SCL -> Board SCL (B8)
EEPROM SDA -> Board SDA (B9)Then I'm using this code;
I2C1.setup({scl:B8,sda:B9}); var eeprom=require("AT24").connect(I2C2, 8, 256, 1); console.log(eeprom.read(0x64,"Merhaba Dunya"));
But I'm getting this error :
Uncaught Error: I2C device not responding at line 1 col 50 ...writeTo(this.i(a),this.a(a));return this.i2c.readFrom(this.i... ^ in function "read" called from line 1 col 42 console.log(eeprom.read(0,"Merhaba Dunya")); ^
What I'm doing wrong?
-
@allObjects I'm using STM32F4 Discovery, I can't see any eeprom spesification in the brief : http://www.st.com/st-web-ui/static/active/en/resource/technical/document/data_brief/DM00037955.pdf
So, I need to buy and plug an eeproom module, then code on it. Am I right?
Thank you for your response Gordon.
I will change my board.