Is it possible to somehow define 2 ports e.g. PortA.1 & PortA.2 with 2 from another e.b. PortB.1 & PorB.2
so that they could be treated like a variable nibble? E.g.
"What Ever the Compination is called" = 0b0101
If not, can Symbols be stacked on one line? I guess I should just try this rather than ask, but while I'm here.
E.g.
define PA1 porta.1 'same for the other 3
PA1=0 ,PA2=1,PB1=0,PB2=1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Chris that looks promising, I think I understand it too!
I would have to run the Macro for every line though, that's a lot of extra MicroC work and I'm using delays between steps to vary the speeds of 2 x stepper motors.
I was using PortA to drive 2x stepper motors but I had to increase the chip speed to use uS. The added xtal took away Ports 6&7 so rather than redesigning the pcb, I was looking for a software fix.
Designing the carriage before the horses arrived!
Maybe I should redesign I'm only on the Mk3 version! I'm slowly being sucked into the sub world of SMD, only Caps, Resistors, Vregs and Motor controllers so far! Those 0.75mm traces or less, really intimidate me!
Because I'm doing a lot of variations in motor directions as in Motor1 CW, Motor2 CWW etc, etc. I was trying to keep the number of lines down just for tidyness and ease of reading.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What processor are you using?
You will probably be able to get a newer chip with 32Mhz internal Clock and
the same footprint.
It would mean resoldering the chip but not redesigning the whole PCB like a
Xtal would.
Thanks Chris that looks promising, I think I understand it too!
I would have to run the Macro for every line though, that's a lot of extra
MicroC work and I'm using delays between steps to vary the speeds of 2 x
stepper motors.
I was using PortA to drive 2x stepper motors but I had to increase the
chip speed to use uS. The added xtal took away Ports 6&7 so rather than
redesigning the pcb, I was looking for a software fix.
Designing the carriage before the horses arrived!
Maybe I should redesign I'm only on the Mk3 version! I'm slowly being
sucked into the sub world of SMD, only Caps, Resistors, Vregs and Motor
controllers so far! Those 0.75mm traces or less, really intimidate me!
Because I'm doing a lot of variations in motor directions as in Motor1 CW,
Motor2 CWW etc, etc. I was trying to keep the number of lines down just for
tidyness and ease of reading.
hi mike
Still need to send the steps though. I'm using 4 x 9110 smd.
Anyway I've sorted it out a different way.
Thanks anyway.
I've re designed the pcb to take ATmega48/88, the pin outs are much better for this application.
I can fit a Xtal and have easy access to a complete port.
Last edit: David Thompson 2018-02-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it possible to somehow define 2 ports e.g. PortA.1 & PortA.2 with 2 from another e.b. PortB.1 & PorB.2
so that they could be treated like a variable nibble? E.g.
"What Ever the Compination is called" = 0b0101
If not, can Symbols be stacked on one line? I guess I should just try this rather than ask, but while I'm here.
E.g.
define PA1 porta.1 'same for the other 3
PA1=0 ,PA2=1,PB1=0,PB2=1
I dont understand the qestion. :-) So, give it a go! :-)
But, can Symbols be stacked. try the line below but there adds no value... just put each one on a new line.
Not as a native GCBasic function but you should be able to do it with a Macro:
Vport is your Variable, VPin0 ..VPin3 are the Physical Port Pins you want to use.
So you example would be:
Vport = 0b0101
SetBits (VPort, PortB.2, PortB.1, PortA.2, PortA.1)
I am not home so it is untested but should set you on the path.
If you needed to read into yor virtual Port the Macro would be:
If I get a chance later I will test them myself.
Cheers
Chris
Thanks Chris that looks promising, I think I understand it too!
I would have to run the Macro for every line though, that's a lot of extra MicroC work and I'm using delays between steps to vary the speeds of 2 x stepper motors.
I was using PortA to drive 2x stepper motors but I had to increase the chip speed to use uS. The added xtal took away Ports 6&7 so rather than redesigning the pcb, I was looking for a software fix.
Designing the carriage before the horses arrived!
Maybe I should redesign I'm only on the Mk3 version! I'm slowly being sucked into the sub world of SMD, only Caps, Resistors, Vregs and Motor controllers so far! Those 0.75mm traces or less, really intimidate me!
Because I'm doing a lot of variations in motor directions as in Motor1 CW, Motor2 CWW etc, etc. I was trying to keep the number of lines down just for tidyness and ease of reading.
What processor are you using?
You will probably be able to get a newer chip with 32Mhz internal Clock and
the same footprint.
It would mean resoldering the chip but not redesigning the whole PCB like a
Xtal would.
On 30 January 2018 at 20:27, David Thompson datman@users.sourceforge.net
wrote:
David,
Have you considered step and direction motor drivers like the A4988 Stepper Motor Driver Module? All the hard stuff is done.
BR
M
hi mike
Still need to send the steps though. I'm using 4 x 9110 smd.
Anyway I've sorted it out a different way.
Thanks anyway.
I've re designed the pcb to take ATmega48/88, the pin outs are much better for this application.
I can fit a Xtal and have easy access to a complete port.
Last edit: David Thompson 2018-02-05