Hi bleeb
When I try to compile it give me a syntax error:
"Line119: Prototype variabele already declared readAnalogChannel"
;Import "k8055.lib"
Prototype.l _openDevice(cardaddress.l)
Prototype _closeDevice()
Prototype.a _readAnalogChannel(channel.a)
Prototype.a _readAllAnalog(aData1.a ...
Search found 27 matches
- Sun Sep 20, 2015 10:13 am
- Forum: Coding Questions
- Topic: Is that correct from the K8055.DLL from velleman
- Replies: 11
- Views: 2824
- Sat Sep 19, 2015 7:29 pm
- Forum: Coding Questions
- Topic: Help on an error - bgi graphics, function plot modules
- Replies: 19
- Views: 5507
Re: Help on an error - bgi graphics, function plot modules
Can you please post the complete modules and main program in zip because I can not compiled itstartup wrote:problem solved.
embarrassingly i gave the wron parameters in the test program
both modules work as expected
Kind regards
Stephane
- Sat Sep 19, 2015 6:27 pm
- Forum: Coding Questions
- Topic: Is that correct from the K8055.DLL from velleman
- Replies: 11
- Views: 2824
Re: Is that correct from the K8055.DLL from velleman
Hi,
I rewrite the code with the syntax of PureBasic. Iqs that correct.
How can I use the functions from the library k8055.dll
;Import "k8055.lib"
Prototype.l _openDevice(cardaddress.l)
Prototype _closeDevice()
Prototype.a _readAnalogChannel(channel.a)
Prototype.a _readAllAnalog(aData1.a ...
I rewrite the code with the syntax of PureBasic. Iqs that correct.
How can I use the functions from the library k8055.dll
;Import "k8055.lib"
Prototype.l _openDevice(cardaddress.l)
Prototype _closeDevice()
Prototype.a _readAnalogChannel(channel.a)
Prototype.a _readAllAnalog(aData1.a ...
- Sat Sep 19, 2015 5:00 pm
- Forum: Coding Questions
- Topic: Is that correct from the K8055.DLL from velleman
- Replies: 11
- Views: 2824
Re: Is that correct from the K8055.DLL from velleman
Can you please repley to my post with my example of SPI example:
http://www.purebasic.fr/english/viewtopic.php?f=13&t=63248
Hi,
no, I don't want to reply.
I'm helping nearly always and on most problems if I think I have enough knowledge to do it.
But at some point I have to stop.
My time is ...
http://www.purebasic.fr/english/viewtopic.php?f=13&t=63248
Hi,
no, I don't want to reply.
I'm helping nearly always and on most problems if I think I have enough knowledge to do it.
But at some point I have to stop.
My time is ...
- Sat Sep 19, 2015 1:57 pm
- Forum: Coding Questions
- Topic: Is that correct from the K8055.DLL from velleman
- Replies: 11
- Views: 2824
Re: Is that correct from the K8055.DLL from velleman
Hi,infratec wrote:Hi,
there is a simple way to check the syntax:
Press the compile button.
Or, from the menu, 'Compiler'->'Syntax check'
Can you please repley to my post with my example of SPI example:
http://www.purebasic.fr/english/viewtop ... 13&t=63248
Thanks
Stephane
- Sat Sep 19, 2015 10:35 am
- Forum: Coding Questions
- Topic: Is that correct from the K8055.DLL from velleman
- Replies: 11
- Views: 2824
Is that correct from the K8055.DLL from velleman
I 'm only a beginner with PureBasic .
I would like to apply the libarary K8055 from Velleman .
I tried to declare all functions with the syntax of PureBasic .
Can someone look at once if everything is correct according to the syntax and semantic.
This my code (trial)
============
Module k8055 ...
I would like to apply the libarary K8055 from Velleman .
I tried to declare all functions with the syntax of PureBasic .
Can someone look at once if everything is correct according to the syntax and semantic.
This my code (trial)
============
Module k8055 ...
- Sun Sep 13, 2015 7:39 pm
- Forum: Coding Questions
- Topic: Control the AD9833 with communication SPI protocol via RS232
- Replies: 13
- Views: 5899
Re: Control the AD9833 with communication SPI protocol via R
Hi,
I don't know what I should do with you...
I gave you all to do this task.
So simply do it.
Or if something is not working, than tell it and I'll try to fix it.
But if you are not able to use the code which I wrote to todo what you need,
than I don't know what I can do for you. Really.
Or ...
I don't know what I should do with you...
I gave you all to do this task.
So simply do it.
Or if something is not working, than tell it and I'll try to fix it.
But if you are not able to use the code which I wrote to todo what you need,
than I don't know what I can do for you. Really.
Or ...
- Sun Sep 13, 2015 7:01 pm
- Forum: Coding Questions
- Topic: Control the AD9833 with communication SPI protocol via RS232
- Replies: 13
- Views: 5899
Re: Control the AD9833 with communication SPI protocol via R
Hi,
I changed my SPI stuff above to be able to transmit more than one byte with SS low.
The demo at the end should do a reset on the AD9833.
Pseudo example:
fout = 400Hz ; fMCLK = 25 MHz
Freq_Reg = (fout * 2 ^ 28) / fMCLK ==> (400Hz * 2 ^ 28) / 25Mhz = 4295 (dec) = 0x10C7 (hex) = 0001 0000 ...
I changed my SPI stuff above to be able to transmit more than one byte with SS low.
The demo at the end should do a reset on the AD9833.
Pseudo example:
fout = 400Hz ; fMCLK = 25 MHz
Freq_Reg = (fout * 2 ^ 28) / fMCLK ==> (400Hz * 2 ^ 28) / 25Mhz = 4295 (dec) = 0x10C7 (hex) = 0001 0000 ...
- Sat Sep 12, 2015 10:34 pm
- Forum: Coding Questions
- Topic: Control the AD9833 with communication SPI protocol via RS232
- Replies: 13
- Views: 5899
Re: Control the AD9833 with communication SPI protocol via R
Hi,
SPI:
MISO - input
MOSI - output
SCLK - output
SS - output
RS232:
CTS - input
DTR - output
RTS - output
TXD - output
So yes, it is possible.
But you need to adjust the voltages:
SPI has normally 5V levels (or 3.3V)
RS232 is at least -9V and +9V
To adjust the output pins is not a big deal ...
SPI:
MISO - input
MOSI - output
SCLK - output
SS - output
RS232:
CTS - input
DTR - output
RTS - output
TXD - output
So yes, it is possible.
But you need to adjust the voltages:
SPI has normally 5V levels (or 3.3V)
RS232 is at least -9V and +9V
To adjust the output pins is not a big deal ...
- Sat Sep 12, 2015 10:27 pm
- Forum: Coding Questions
- Topic: Control the AD9833 with communication SPI protocol via RS232
- Replies: 13
- Views: 5899
Re: Control the AD9833 with communication SPI protocol via R
Hi,
you have the code for the I²C. So where is the big problem to write the code :?:
Anyway, here is the slowest implementation of SPI (but multiple ports possible):
;
; SPI over RS232
;
; MISO - CTS
; MOSI - DTR
; SCLK - RTS
; SS - TXD
CompilerIf #PB_Compiler_IsMainFile
EnableExplicit ...
you have the code for the I²C. So where is the big problem to write the code :?:
Anyway, here is the slowest implementation of SPI (but multiple ports possible):
;
; SPI over RS232
;
; MISO - CTS
; MOSI - DTR
; SCLK - RTS
; SS - TXD
CompilerIf #PB_Compiler_IsMainFile
EnableExplicit ...
- Sat Sep 12, 2015 9:25 pm
- Forum: Coding Questions
- Topic: Control the AD9833 with communication SPI protocol via RS232
- Replies: 13
- Views: 5899
Re: Control the AD9833 with communication SPI protocol via R
Hi,
SPI:
MISO - input
MOSI - output
SCLK - output
SS - output
RS232:
CTS - input
DTR - output
RTS - output
TXD - output
So yes, it is possible.
But you need to adjust the voltages:
SPI has normally 5V levels (or 3.3V)
RS232 is at least -9V and +9V
To adjust the output pins is not a big deal ...
SPI:
MISO - input
MOSI - output
SCLK - output
SS - output
RS232:
CTS - input
DTR - output
RTS - output
TXD - output
So yes, it is possible.
But you need to adjust the voltages:
SPI has normally 5V levels (or 3.3V)
RS232 is at least -9V and +9V
To adjust the output pins is not a big deal ...
- Sat Sep 12, 2015 8:47 pm
- Forum: Coding Questions
- Topic: Asked : demo application only with the serialport
- Replies: 2
- Views: 1093
Re: Asked : demo application only with the serialport
Hi,
I think you are totally wrong here.
For that what you are want todo, you need a microcontroller and not a PC.
Or a microcontroller between your PC and your other hardware.
And if you don't have the knowledge about all that, than you need more intelligent 'ready' hardware.
Like USB ...
I think you are totally wrong here.
For that what you are want todo, you need a microcontroller and not a PC.
Or a microcontroller between your PC and your other hardware.
And if you don't have the knowledge about all that, than you need more intelligent 'ready' hardware.
Like USB ...
- Sat Sep 12, 2015 8:39 pm
- Forum: Coding Questions
- Topic: Control the AD9833 with communication SPI protocol via RS232
- Replies: 13
- Views: 5899
Re: Control the AD9833 with communication SPI protocol via R
As mentioned in your other thread:
Use a microntroller between, which translates serial commands into SPI.
Or use a LPT port.
A serial port direct needs a lot of hardware around to adjust the voltage levels.
Bernd
Brend
I use the serialport but I have need the general functions for SPI ...
Use a microntroller between, which translates serial commands into SPI.
Or use a LPT port.
A serial port direct needs a lot of hardware around to adjust the voltage levels.
Bernd
Brend
I use the serialport but I have need the general functions for SPI ...
- Sat Sep 12, 2015 4:14 pm
- Forum: Coding Questions
- Topic: Control the AD9833 with communication SPI protocol via RS232
- Replies: 13
- Views: 5899
- Sat Sep 12, 2015 8:40 am
- Forum: Coding Questions
- Topic: Control the AD9833 with communication SPI protocol via RS232
- Replies: 13
- Views: 5899
Control the AD9833 with communication SPI protocol via RS232
Hi all,
I have need SPI communication for the AD9833 is a DDS chip and communication with the serialport.
I have ready the hardware in the form of a board from analog devices.
I would now like to program the AD9833 with pure basic and communicate via the SPI protocol .
I never go a module where ...
I have need SPI communication for the AD9833 is a DDS chip and communication with the serialport.
I have ready the hardware in the form of a board from analog devices.
I would now like to program the AD9833 with pure basic and communicate via the SPI protocol .
I never go a module where ...