Search found 9 matches

by vitor_boss
Sun Apr 23, 2017 2:48 pm
Forum: General discussion
Topic: Serial.write problem
Replies: 20
Views: 366

Re: Serial.write problem

Did you try changing the line to this as I suggested? Serial.write((byte *)&response, npage_size[currentPage]); Yes, no output bytes either. Quick question, shouldn't you be using just "response" rather than "(byte *)&response" since response is an array? Such as: Serial...
by vitor_boss
Fri Apr 21, 2017 10:14 am
Forum: General discussion
Topic: Serial.write problem
Replies: 20
Views: 366

Re: Serial.write problem

victor_pv wrote:
vitor_boss wrote:Thanks, I will try that


Did you try changing the line to this as I suggested?

Code: Select all

Serial.write((byte *)&response, npage_size[currentPage]);

Yes, no output bytes either.
by vitor_boss
Wed Apr 19, 2017 7:37 pm
Forum: General discussion
Topic: Serial.write problem
Replies: 20
Views: 366

Re: Serial.write problem

BennehBoy wrote:Can you not just write out a single byte at a time in the loop?

I'm using Serial.write in some ecu code, but only 1 byte at a time.

That worked for 64 bytes, thank you, but on Line 773 with a 192(3x64) bytes if fails too.

Edit: worked for first reading, next readings only output 50 bytes
by vitor_boss
Wed Apr 19, 2017 7:25 pm
Forum: General discussion
Topic: Serial.write problem
Replies: 20
Views: 366

Re: Serial.write problem

That is my software log: 19/04/17 16:16:27 :Info: Activating page: 1 19/04/17 16:16:27 :Time: 0:10.602: SENT 2 bytes iwd=10, 2 bytes x50 x01 P. 19/04/17 16:16:27 :Time: 0:10.613: SENT 1 bytes iwd=10, 1 bytes x56 V 19/04/17 16:16:28 :Debug: Read page time: 174ms. 19/04/17 16:16:28 :Time: 0:10.763: RE...
by vitor_boss
Wed Apr 19, 2017 7:18 pm
Forum: General discussion
Topic: Serial.write problem
Replies: 20
Views: 366

Re: Serial.write problem

vitor, could you please explain what exactly means "it didn't work"? Are any bytes sent over serial? Are they wrong? Any serial monitor log available to show the problem? I would try this way: Serial.write(response, sizeof(response)); It seems that an 16 bit value (x) is added and...
by vitor_boss
Wed Apr 19, 2017 7:16 pm
Forum: General discussion
Topic: Serial.write problem
Replies: 20
Views: 366

Re: Serial.write problem

This is the problem, before that call the code use the same loop for a 288 bytes Serial.write and a lot of Serial.print and all work fine, only that lines aren't giving outputs code is at https://github.com/noisymime/speeduino/blob/master/speeduino/comms.ino Hi vitor, I can't see any uint8_t/uint16...
by vitor_boss
Wed Apr 19, 2017 11:09 am
Forum: General discussion
Topic: Serial.write problem
Replies: 20
Views: 366

Re: Serial.write problem

I could test it, but that is not the point, on Mega and Teensy it works with no problem, why isn't working with Maple mini?
by vitor_boss
Wed Apr 19, 2017 10:43 am
Forum: General discussion
Topic: Serial.write problem
Replies: 20
Views: 366

Re: Serial.write problem

This is the problem, before that call the code use the same loop for a 288 bytes Serial.write and a lot of Serial.print and all work fine, only that lines aren't giving outputs

code is at https://github.com/noisymime/speeduino/ ... /comms.ino
by vitor_boss
Wed Apr 19, 2017 10:18 am
Forum: General discussion
Topic: Serial.write problem
Replies: 20
Views: 366

Serial.write problem

Hi, this is my first post on this forum, currently I'm help to develop Speeduino EMS/ECUand now I'm trying to convert code to Maple mini (STM32F103CBT6). One of communication protocol use Serial.write and I'm facing problems with. Code is: //All other bytes can simply be copied from the config table...

Go to advanced search