I WOULD LIKE TO USE A PIC16F877 AS KEY OPERATION INTERFACE, TO RECORD AUDIO DATA WITH REC/PB CONTROLLER AND STORE THE FILE TO SD CARD.THE COMMAND FORMAT IS A LITTLE STRANGE AS THE REC/PB CONTROLLER NEEDS RX-TX DATA IN HEXADECIMAL FORM. THE COMMAND serout PIN,BAUDRATE_8,(0xXX) NOT WORK.MAYBE THERE IS A PROBLEM WITH SERIAL INITIALIZATION OR SYNTAX OF SENDING DATA COMMAND (PIC-BASIC CODE).SO, IS THERE ANY IDEA FOR A CODE THAT CAN REALIZE THAT SERIAL COMMUNICATION BETWEEN PIC16F877 OR SIMILAR WITH SD CARD AUDIO RECORDER? BLOCK DIAGRAM AND SOME INFO ABOUT RECORDER ARE AT PDF BELOW.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think you have the syntax from another programming language. Hserout is from Picaxe.
Your correct syntax is SerSend channel, data
I would create a table of all the command data codes, then create a sub to send multiple sersends in a loop to the number of commands you need to send. The sub should the two parameters. The position in table, and number of commands to sent.
If you need some sample code let me know.
Anobium
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
THANKS Anobium .YOU'VE RIGHT ABOUT HSEROUT . SOME TIMES I USE PIC-AXE CHIPS, SO I'M CONFUSED ABOUT THIS COMMAND. GOOD IDEA THE TABLE WITH COMMAND DATA CODES. I WOULD LIKE SOME SAMPLE CODE IN PIC-BASIC, TO MAKE SOME TESTS ON HOW TO SEND COMMANDS TO REC/PB CONTROLLER WITH SOME PUSH BUTTONS.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
MANY THANKS Anobium FOR THE INFO.I'LL MAKE SOME TESTS TO RECORD AUDIO DATA TO MINI-SD CARD.AFTER THAT,IF THE CODE WORKS I'LL TRY TO CONNECT A LCD DISPLAY TO MONITOR RETURN DATA FROM REC/PB CONTROLLER.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
YOU'VE RIGHT WILLIAM.I'M JUST CONFUSED WITH THE COMMAND FORMAT .PB/REC CONTROLLER IS CONTROLLED BY A TYPICAL UART AS SERIAL INTERFACE,BUT THE PROTOCOL COMMAND FORMAT IT SEEMS TO ME A LITTLE STRANGE, USING HEX NUMBERS AND ASCLL CODE FOR DATA.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I WOULD LIKE TO USE A PIC16F877 AS KEY OPERATION INTERFACE, TO RECORD AUDIO DATA WITH REC/PB CONTROLLER AND STORE THE FILE TO SD CARD.THE COMMAND FORMAT IS A LITTLE STRANGE AS THE REC/PB CONTROLLER NEEDS RX-TX DATA IN HEXADECIMAL FORM. THE COMMAND serout PIN,BAUDRATE_8,(0xXX) NOT WORK.MAYBE THERE IS A PROBLEM WITH SERIAL INITIALIZATION OR SYNTAX OF SENDING DATA COMMAND (PIC-BASIC CODE).SO, IS THERE ANY IDEA FOR A CODE THAT CAN REALIZE THAT SERIAL COMMUNICATION BETWEEN PIC16F877 OR SIMILAR WITH SD CARD AUDIO RECORDER? BLOCK DIAGRAM AND SOME INFO ABOUT RECORDER ARE AT PDF BELOW.
There should not be any issue with serial communications.
What version of GCB are you using?
BELOW ARE SOME INFO ABOUT REC/PB CONTROLLER AND SERIAL COMMUNICATION FORMAT.
THANKS IN ADVANCE.
GCB VERSION : 1.0 23/6/2012 .
Please upgrade. This version is very old.
Please follow https://sourceforge.net/projects/gcbasic/files/latest/download
THANKS Anobium . I MADE THE UPGRADE WITH NO RESULTS. COMMAND Hserout[$xx..$xx] ALSO NOT WORK. I'LL CHECK THE HARDWARE AGAIN.
Can you attach your code as a zip? I am puzzled to you approach.
I think you should be using HSERSEND. I would use a table to contain all your command parameters then simple loop thru.
A PART OF DEMO CODE IS BELOW. THE PROBLEM IS THE SYNTAX OF COMMAND FOR SENDING DATA IN HEX FORM .WHEN COMPILING THERE IS AN ERROR FOR HSEROUT.
I think you have the syntax from another programming language. Hserout is from Picaxe.
Your correct syntax is SerSend channel, data
I would create a table of all the command data codes, then create a sub to send multiple sersends in a loop to the number of commands you need to send. The sub should the two parameters. The position in table, and number of commands to sent.
If you need some sample code let me know.
Anobium
THANKS Anobium .YOU'VE RIGHT ABOUT HSEROUT . SOME TIMES I USE PIC-AXE CHIPS, SO I'M CONFUSED ABOUT THIS COMMAND. GOOD IDEA THE TABLE WITH COMMAND DATA CODES. I WOULD LIKE SOME SAMPLE CODE IN PIC-BASIC, TO MAKE SOME TESTS ON HOW TO SEND COMMANDS TO REC/PB CONTROLLER WITH SOME PUSH BUTTONS.
Sorry? Example code in PIC-BASIC?
An example table with a command set. This uses a table and one parameter to call the command data set.
Enjoy.
MANY THANKS Anobium FOR THE INFO.I'LL MAKE SOME TESTS TO RECORD AUDIO DATA TO MINI-SD CARD.AFTER THAT,IF THE CODE WORKS I'LL TRY TO CONNECT A LCD DISPLAY TO MONITOR RETURN DATA FROM REC/PB CONTROLLER.
It does not matter if the data is sent in hex, decimal or binary. These are just different ways of expressing a numerical value.
For example, there is no difference between
hsersend 138
hersend 0x8A
Hsersend b'10001010'
YOU'VE RIGHT WILLIAM.I'M JUST CONFUSED WITH THE COMMAND FORMAT .PB/REC CONTROLLER IS CONTROLLED BY A TYPICAL UART AS SERIAL INTERFACE,BUT THE PROTOCOL COMMAND FORMAT IT SEEMS TO ME A LITTLE STRANGE, USING HEX NUMBERS AND ASCLL CODE FOR DATA.