WAKE Pins and Rese PINS

Hi All,

I am using the ALFAT USB Module and need to know the following to get is started as I can get it to receive of transmit data,

  1. WAKE Pin - Do I connect it to +5V
  2. RESET PIN, can I leave it low connected to 0V?
  3. I have pulled PIN 7 and 8 Low as I am using the UART
  4. VBatt connected to VCC but with three diodes in series

Any other suggestions?

Regards,

Gavin

wake pin only causes effect when ALFAT is sleep. You can leave unconnected.

Reset pin must be high for the device to function. This pin is not 5V tolerant.

Hi Gus,

Many Thanks for the reply, if I pull the rest pin to +3.3V is that ok?, I will not damage to device at +3.3V?

Regards,

Gavin

Just one more thing, I assume I don’t need to run the device through a max232 unless I connect it to a pc?, I can run the device straight to a PIC using TX/RX and GND?, or is it advisable to run it through a max232?

No need for rs232

Great - thanks!, I assume +3.3V on the reset pin is ok?

Yes

Hi Gus,

Just a quick question I have tried the board and I assume I have damaged the board by putting 4.0V on the VBATT pin as I have been measuring about on the board and see that VCC is at 1.7V, I assume it should be at 3.3V?,

Also Just to make sure I have it right, I am going to connect the Pins below on 3.3V to avoid the mistake above, that would be:

  1. VBATT PIN
  2. RESET PIN
  3. And PIN 18 which is the 5V Input
  4. PIN 7, 8 and 15 would be 0V as I am using the UART

If I connect it to a MAX232 on my pc is there any other protection I must need or should that be ok?, as I need to change the Baud Rate to 9600…

I need to change the Baud rate to 9600 using: B2580 am I correct?,

Regards,

Gavin

HI Gus,

I go the 2nd board working 100% at 3.3V

To change the Baud rate to 9600 I am battling a little I have tried b2580\r and various other types and still I get !02, please can you help?

@ gavo4444 -

Should be B2580

it can be:

  • “B 2580\r”
  • “b 2580\r”
  • “B 2580\n”
  • “b 2580\n”

They are all should work, but needs a SPACEEEEEEEEEE between B and 2580 :)))

Dat, you are a champion!, many thanks!

I used to use the old ualfat and it worked like a champion, I assume I could sue the same type of format to save data

I used the Commands for the ulfat:

  1. R
  2. I
  3. M Test
  4. A Test
  5. A
  6. O 2W>Test.Txt
  7. L
  8. W 2>8
  9. “Hello World!”
  10. F2
  11. L

Do you think I could use the same set up just the strings which need to be modified?, all I need it to create a folder and then dump data into a .txt file

@ gavo4444 -

  • " I M:\r" => Initialize an SD with default clock
  • Wait and read returned bytes “!00\r”
  • “O 0W>M:\FOLDER\TEST.TXT\r” => Open a new handle for writting and the FOLDER folder will be created if it doesn’t exist.
  • Wait and read returned bytes “!00\r”
  • “W 0>3\r” => write 3 bytes to handle 0
  • Wait and read returned bytes “!00\r”
  • “ABC” ================> write raw data and there should be NO “\r”
  • Wait and read returned bytes “$0000003\r!00\r”
  • “C 0\r” => Close handle 0
  • Wait and read returned bytes “!00\r”

Hi Dat,

Please see below:

O 0W>3\r
V
v1.0.8
!00
!00
B 2580
!00

v1.0.8
!00
I M:
!11
!00
I U1:
!11
!00
I U1:
!11
!00
O 0W>M:\FOLDER\TEST.TXT
!10
!00
O 0W>M:\FOLDER\TEST.TXT
!10
!00
W 0>3
!36
!00
ABCLO
!02
!00
ABC
!02
!00
I U1:
!11
!00
O 0W>M:\FOLDER\TEST.TXT
!10
!00
W 0>3
!36
!00

Please see attached, if I add the \r and \n at the end in my terminal program I get an error, an ideas on how to keep a baud rate of 9600 when the power is off?

from your post, there are 2 parts:
Part 1

And I don’t think ALFAT returned !00 with this command. It should be !02 or something else, because it is wrong command. It must be: “O 0W>[Driver:][PATH]\r”

Part 2

If you are talking about ALFAT USB, if I remember correctly, ALFAT USB has only one USB and there should be USB0 with initialize command “I U0:”, there is also no SD.

And one more thing I don’t understand, those commands like “I” (Initialize) or “O” (Open a handle), the returned bytes should be 4 bytes, but there you are having 8 bytes. I am really don’t know where they come from, but I am sure it is NOT come from ALFAT. Are you sure the way you read is correct? Try to check offset variable on your UART buffer

Example:

If this command is successful, it should be only “!00\n”, otherwise, it maybe “!10\n” or “!11\n” or something else.
But here you have both “!10\n” (not success) and “!00\n” (success)

The next thing is:

Why do you have '' at the end of the command? That should be file name.

Hi Dat,

Thanks for the reply, Yes I am using the USB OEM Module,

I am also scratching y head why it returns 8 Bytes Unsuccessful and Successful, driving me nuts,

I will leave out the \ tomorrow and use a file name

Many Thanks for the help…

@ gavo4444 -

I think in your code, you sent 2 characters “\r\r” or “\r\n”…
Check your UART configuration. Maybe it added ‘\n’ for each command automatically.

@ Dat -

And if you want to test USB, make sure that 5V is connected to pin 18

Hi Dat,

Making some progress, my echo was on and I have taken it off and the 8 bytes have disappeared,

I came right with the I command it is:

I U0:

No problems there, for the O to create the folder it keep giving me a !10 error, maybe I am doing something wrong (I am sure I am)

I use:

O 0W>M:\TEST\TEST.TXT

Please advise.

am I right is assuming in the 0W the 0 can be anything?, 1,2 ,3 etc?

Regards,

Gavin

@ gavo4444 -

Sure you were wrong because you Initialize an USB but you created file/folder on SD

It must be O 0W>U0:\TEST\TEST.TXT

Replace M: by U0: becuase M: is SD drive :)))

Not anything, it will be 0x0->0xF, it means max 16 handles can be opened.

Hi Dat,

Looks like I have got it!,

I send:

I U0:
O 0W>U0:\TEST\TEST.TXT
W 0>3
ABC
C 0

Works great!,

Just the last question, how do I keep the baud rate of 9600 or 38400 when the power goes off?, I want to run my board at 9600 or 38400 , please advise…:wink: