Is the BASIC STAMP going to receive the entire schedule and use that to tell the CY what file to play at the scheduled time, or is it going to be told to play a specific file at the scheduled time? In other words is the scheduling done by the BASIC STAMP or by an external system?
You can access any EEPROM memory location with the READ and WRITE directive but be careful that you don't overwrite your program.
There is also the DATA directive which stores data in the EEPROM and then your program uses the READ command to retrieve it.
You could store groups of CY-T16 commands as DATA and then READ them before using the SEROUT command.
What's a Microcontroller (WAM) teaches how to use DATA, READ, and WRITE.
Excuse me for cutting in, does anyone know why cydelcamat's post counter isn't working, he started this thread at post #47, and over two dozen posts later, it's still 47.
Hi guys im back again. this are my codes for playing the mp3 module by using VB program. the commands we used is play, pause, previous and next. our next step is to create a schedule for alarms and store it to basic stamp. does anyone here has an experience on doing that? thanks!!!!
main:
SERIN 16, 84, [cmd_buff]
IF cmd_buff = "A" THEN
SEROUT 14, T9600, [$7E, $FF, $06, $11, $00, $00, $01, $FE, $E9, $EF]
ELSEIF cmd_buff = "a" THEN
SEROUT 14, T9600, [$7E, $FF, $06, $0E, $00, $00, $00, $FE, $ED, $EF]
ENDIF
You were asked this before but never answered.
Is the schedule a part of the BS2 program or does the schedule get sent to the BS2?
If it's part of the program then you store it in DATA statements and retrieve it using the READ command.
You can find examples of both in What's a Microcontroller and The BASIC Stamp Manual.
Hi guys im back again. this are my codes for playing the mp3 module by using VB program. the commands we used is play, pause, previous and next. our next step is to create a schedule for alarms and store it to basic stamp. does anyone here has an experience on doing that? thanks!!!!
Best way of doing that depends on the GPS time format and how many commands are needed for each event. Most of my schedules use the "@" to specify the time, followed by the time of day in minutes, followed by the commands needed for that event.
How many commands need to be sent to the CY for each event?
Hi guys sorry for the late reply. The basic stamp will store the schedules sent from vb program. How can we send and store schedule from vb program to basic stamp 2? THANKS!
Hi guys sorry for the late reply. The basic stamp will store the schedules sent from vb program. How can we send and store schedule from vb program to basic stamp 2? THANKS!
Essentially you will need to store a list of the times an event is to happen and the command (or multiple commands) that need to be sent to the CY. My initial thought would be a simple list of the commands with required parameters such as the following:
$40 09:00 ' time command (@ 09:00)
$03 $00 $0007 ' CY command and parameter (play track 7)
$40 10:30 ' at 10:30
$03 $00 $0009 ' play track 9
The time command byte could be any 8 bit value. I generally use the @ ($40) character. The time itself could be stored in the same format as the gps data for ease of comparison.
Since the first 3 bytes and the last byte of the commands are always the same, and the checksum is calculated, you only need to store the command, feedback, and parameter 1 & 2 in the table.
I`ve attach a print screen of our existing vb program which gives(export and synchronize) schedule to our currently using PIC. Now my problem is how can i store schedule on basic stamp`s eeprom. all tutorial i see about read and write is how to put decimal to specific address of eeprom. Can you guys help me how can i put the schedule(time) in eeprom. TIA guys.
Hi guys sorry for the late reply. The basic stamp will store the schedules sent from vb program. How can we send and store schedule from vb program to basic stamp 2? THANKS!
Essentially you will need to store a list of the times an event is to happen and the command (or multiple commands) that need to be sent to the CY. My initial thought would be a simple list of the commands with required parameters such as the following:
$40 09:00 ' time command (@ 09:00)
$03 $00 $0007 ' CY command and parameter (play track 7)
$40 10:30 ' at 10:30
$03 $00 $0009 ' play track 9
The time command byte could be any 8 bit value. I generally use the @ ($40) character. The time itself could be stored in the same format as the gps data for ease of comparison.
Since the first 3 bytes and the last byte of the commands are always the same, and the checksum is calculated, you only need to store the command, feedback, and parameter 1 & 2 in the table.
Sir Kwinn, can u give me a differ explanation? Sorry that u cant understand your first explanation, TIA
Hi guys sorry for the late reply. The basic stamp will store the schedules sent from vb program. How can we send and store schedule from vb program to basic stamp 2? THANKS!
Essentially you will need to store a list of the times an event is to happen and the command (or multiple commands) that need to be sent to the CY. My initial thought would be a simple list of the commands with required parameters such as the following:
$40 09:00 ' time command (@ 09:00)
$03 $00 $0007 ' CY command and parameter (play track 7)
$40 10:30 ' at 10:30
$03 $00 $0009 ' play track 9
The time command byte could be any 8 bit value. I generally use the @ ($40) character. The time itself could be stored in the same format as the gps data for ease of comparison.
Since the first 3 bytes and the last byte of the commands are always the same, and the checksum is calculated, you only need to store the command, feedback, and parameter 1 & 2 in the table.
Sir Kwinn, can u give me a differ explanation? Sorry that u cant understand your first explanation, TIA
I will try to explain better once I understand what you need to do better than I do now.
That screen shot helps a little, but what we really need to see is the actual data that is being sent to the PIC by the VB program for a few of the events. That data has to be stored by the BS2 in a format it can use to send the appropriate commands to the CY chip.
Hi guys sorry for the late reply. The basic stamp will store the schedules sent from vb program. How can we send and store schedule from vb program to basic stamp 2? THANKS!
Essentially you will need to store a list of the times an event is to happen and the command (or multiple commands) that need to be sent to the CY. My initial thought would be a simple list of the commands with required parameters such as the following:
$40 09:00 ' time command (@ 09:00)
$03 $00 $0007 ' CY command and parameter (play track 7)
$40 10:30 ' at 10:30
$03 $00 $0009 ' play track 9
The time command byte could be any 8 bit value. I generally use the @ ($40) character. The time itself could be stored in the same format as the gps data for ease of comparison.
Since the first 3 bytes and the last byte of the commands are always the same, and the checksum is calculated, you only need to store the command, feedback, and parameter 1 & 2 in the table.
Sir Kwinn, can u give me a differ explanation? Sorry that u cant understand your first explanation, TIA
I will try to explain better once I understand what you need to do better than I do now.
That screen shot helps a little, but what we really need to see is the actual data that is being sent to the PIC by the VB program for a few of the events. That data has to be stored by the BS2 in a format it can use to send the appropriate commands to the CY chip.
Sir Kwinn. Just give us a short example of how store time in eeprom. thats all i want to know because. all i see examples on how to read and write eeprom is just decimals to specific address of eeprom. If u know can u teach me?. needed badly.
Data is stored to eeprom as bytes, so you would store the times and the CY commands as a string of bytes. These command bytes would have to be received from the VB software and written to the eeprom using the WRITE command.
Time can be stored in several formats. The simplest would be to store it as 4 ascii characters (hh mm) which can be compared directly to the ascii characters from the gps units.
Another option would be to store it as 2 bytes of binary or hex data. More compact but more work to compare to the gps data.
The best choice depends on the format of the incoming VB and GPS data, so it is important to have that information.
Data is stored to eeprom as bytes, so you would store the times and the CY commands as a string of bytes. These command bytes would have to be received from the VB software and written to the eeprom using the WRITE command.
Time can be stored in several formats. The simplest would be to store it as 4 ascii characters (hh mm) which can be compared directly to the ascii characters from the gps units.
Another option would be to store it as 2 bytes of binary or hex data. More compact but more work to compare to the gps data.
The best choice depends on the format of the incoming VB and GPS data, so it is important to have that information.
Comments
You can access any EEPROM memory location with the READ and WRITE directive but be careful that you don't overwrite your program.
There is also the DATA directive which stores data in the EEPROM and then your program uses the READ command to retrieve it.
You could store groups of CY-T16 commands as DATA and then READ them before using the SEROUT command.
What's a Microcontroller (WAM) teaches how to use DATA, READ, and WRITE.
Just curious.
main:
SERIN 16, 84, [cmd_buff]
IF cmd_buff = "A" THEN
SEROUT 14, T9600, [$7E, $FF, $06, $11, $00, $00, $01, $FE, $E9, $EF]
ELSEIF cmd_buff = "a" THEN
SEROUT 14, T9600, [$7E, $FF, $06, $0E, $00, $00, $00, $FE, $ED, $EF]
ENDIF
IF cmd_buff = "B" THEN
SEROUT 14, T9600, [$7E, $FF, $06, $01, $00, $00, $00, $FE, $FA, $EF]
ELSEIF cmd_buff = "b" THEN
SEROUT 14, T9600, [$7E, $FF, $06, $02, $00, $00, $00, $FE, $F9, $EF]
ENDIF
GOTO main
Your code should look like this:
You were asked this before but never answered.
Is the schedule a part of the BS2 program or does the schedule get sent to the BS2?
If it's part of the program then you store it in DATA statements and retrieve it using the READ command.
You can find examples of both in What's a Microcontroller and The BASIC Stamp Manual.
Best way of doing that depends on the GPS time format and how many commands are needed for each event. Most of my schedules use the "@" to specify the time, followed by the time of day in minutes, followed by the commands needed for that event.
How many commands need to be sent to the CY for each event?
What does the schedule look like and how often does it change?
The schedule can be stored in the EEPROM using the WRITE command and then retrieved as needed using the READ command.
Essentially you will need to store a list of the times an event is to happen and the command (or multiple commands) that need to be sent to the CY. My initial thought would be a simple list of the commands with required parameters such as the following:
The time command byte could be any 8 bit value. I generally use the @ ($40) character. The time itself could be stored in the same format as the gps data for ease of comparison.
Since the first 3 bytes and the last byte of the commands are always the same, and the checksum is calculated, you only need to store the command, feedback, and parameter 1 & 2 in the table.
https://datatype.helixcommunity.org/mp3dec.html there is an arm port and or this one http://www.underbit.com/products/mad/
32K ram needed, 48Mhz may not be enough
http://www.mouser.com/Semiconductors/Embedded-Processors-Controllers/Microcontrollers-MCU/ARM-Microcontrollers-MCU/_/N-a85pcZscv7?Rl=a85pcZgjdh8lZ1z0w51jZ1z0w7wuSGTa85pcZgjdgz4Z1yytnbnZ1yx1q0fSGT&Ns=Pricing|0
Sir Kwinn, can u give me a differ explanation? Sorry that u cant understand your first explanation, TIA
I will try to explain better once I understand what you need to do better than I do now.
That screen shot helps a little, but what we really need to see is the actual data that is being sent to the PIC by the VB program for a few of the events. That data has to be stored by the BS2 in a format it can use to send the appropriate commands to the CY chip.
Sir Kwinn. Just give us a short example of how store time in eeprom. thats all i want to know because. all i see examples on how to read and write eeprom is just decimals to specific address of eeprom. If u know can u teach me?. needed badly.
Time can be stored in several formats. The simplest would be to store it as 4 ascii characters (hh mm) which can be compared directly to the ascii characters from the gps units.
Another option would be to store it as 2 bytes of binary or hex data. More compact but more work to compare to the gps data.
The best choice depends on the format of the incoming VB and GPS data, so it is important to have that information.
oh i get it. thanks i`ll give it a try to do it